/* ═══════════════════════════════════════════════════════════════════════
   TLA Archives — เนื้อหน้า /archives

   โทนสี: กระดาษสาครีม · หมึกน้ำตาลอบอุ่น · ทองเก่า · เขียวใบไม้
   ให้ความรู้สึกเป็นเอกสารเก่าที่ยังมีชีวิต ไม่ใช่พิพิธภัณฑ์ที่หยุดนิ่ง

   โครงหน้าและการ์ดอ้างอิงแนวทางเทมเพลตสมัยใหม่ (มุมโค้ง เงานุ่ม
   ป้ายกำกับเล็กเหนือหัวข้อ การ์ดยกตัวเมื่อชี้) แต่เปลี่ยนสีและจังหวะ
   ให้เข้ากับงานจดหมายเหตุไทย

   คู่กับ shell.css ซึ่งโหลดมาก่อนและถือตัวแปรสี ฟอนต์ reset และปุ่มมาตรฐาน
   ไว้ทั้งหมด ไฟล์นี้จึงมีแต่กฎของเนื้อหน้าล้วน ๆ ไม่มีกฎที่ทับกันสองไฟล์
   ═══════════════════════════════════════════════════════════════════════ */

.tla-ar-page {
    background:
        radial-gradient(900px 520px at 88% -10%, rgba(194, 161, 74, .13), transparent 62%),
        radial-gradient(760px 460px at 4% 2%, rgba(110, 139, 84, .10), transparent 58%),
        var(--paper);
    color: var(--ink);
    font-family: var(--arc-ff);
}

.tla-ar-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── ป้ายกำกับเล็กเหนือหัวข้อ ─────────────────────────────────── */
.tla-ar-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .95rem;
    border: 1px solid var(--gold-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    font-size: .78rem;
    letter-spacing: .06em;
    color: var(--rust);
}

.tla-ar-eyebrow svg { width: 15px; height: 15px; }

/* เส้นทองคั่น มีข้าวหลามตัดตรงกลาง */
.tla-ar-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: .6rem 0 1.1rem;
}

.tla-ar-rule::before,
.tla-ar-rule::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tla-ar-rule i {
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(194, 161, 74, .18);
}

/* ── ส่วนหัว ──────────────────────────────────────────────────── */
.tla-ar-hero {
    padding: 3.4rem 0 2.6rem;
    text-align: center;
}

.tla-ar-hero h1 {
    margin: 1rem 0 .3rem;
    font-size: clamp(1.5rem, 3.4vw, 2.15rem);
    font-weight: 600;
    line-height: 1.4;
}

.tla-ar-hero .en {
    display: block;
    margin-bottom: .9rem;
    font-family: 'Chonburi', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.9rem, 5vw, 3.1rem);
    line-height: 1.15;
    color: var(--rust);
}

.tla-ar-hero p {
    max-width: 640px;
    margin: 0 auto;
    font-size: .98rem;
    line-height: 1.85;
    color: var(--ink-soft);
}

/* ── ช่องค้นหา ────────────────────────────────────────────────── */
.tla-ar-search {
    display: flex;
    gap: .5rem;
    max-width: 780px;
    margin: 1.8rem auto .9rem;
    padding: .45rem .45rem .45rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.tla-ar-search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    min-width: 0;
}

.tla-ar-search input::placeholder { color: var(--ink-mute); }

/* ช่องค้นหาอยู่แถวเดียวกับปุ่มสองปุ่ม พอจอแคบปุ่มกินที่หมดจนช่องกรอกเหลือ
   ความกว้างไม่กี่สิบพิกเซล (ขึ้นว่า "สื…") แยกเป็นสองแถวแทน */
@media (max-width: 575.98px) {
    .tla-ar-search {
        flex-wrap: wrap;
        border-radius: 22px;
        padding: .9rem 1rem;
    }

    .tla-ar-search input { flex: 1 0 100%; padding-bottom: .6rem; }
    .tla-ar-search .tla-ar-btn { flex: 1; justify-content: center; }
}

/* คำค้นแนะนำใต้ช่องค้นหา */
.tla-ar-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .45rem;
    font-size: .85rem;
    color: var(--ink-mute);
}

.tla-ar-chip {
    padding: .3rem .85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    color: var(--ink-soft);
    cursor: pointer;
    transition: all .18s ease;
}

.tla-ar-chip:hover {
    border-color: var(--gold);
    background: #fff;
    color: var(--rust);
}

/* ═══ สามช่องหลัก — แต่ละช่องดึงข้อมูลคนละแหล่ง ═══════════════
   ซ้าย  TLA Activities  ← ฐานข้อมูล tla-post2
   กลาง  TLA Archives    ← Omeka S API
   ขวา   TLA Dataverse   ← Dataverse Search API
   ช่องกลางกว้างกว่าเพราะเป็นแกนหลักของหน้า

   ⚠️ ต้องใช้ minmax(0, …) ไม่ใช่ 1fr เปล่า ๆ
      เพราะ 1fr มีค่าเท่ากับ minmax(auto, 1fr) ซึ่ง auto จะกว้างอย่างน้อย
      เท่าเนื้อหาที่ตัดบรรทัดไม่ได้ในช่องนั้น เช่นแถบข่าวด่วนที่ตั้ง nowrap ไว้
      ถ้าหลังบ้านตั้งข่าวด่วนหลายรายการ ช่องซ้ายจะถูกดันจนกว้างเต็มแถว
      แล้วบีบอีกสองช่องจนตัวหนังสือเรียงลงมาทีละตัว
      (min-width: 0 บนลูกไม่ช่วย เพราะเป็นค่าต่ำสุด ไม่ใช่ค่าสูงสุด)
   ─────────────────────────────────────────────────────────── */
.tla-ar-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1.1rem;
    margin: 2.4rem 0 3.4rem;
    align-items: start;
}

@media (max-width: 1080px) {
    .tla-ar-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tla-ar-cols .is-center { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 720px) {
    .tla-ar-cols { grid-template-columns: minmax(0, 1fr); }
}

.tla-ar-panel {
    display: flex;
    flex-direction: column;
    /* ตัวการ์ดเองก็ต้องยอมแคบกว่าเนื้อหา ไม่งั้นจะล้นออกนอกช่องของ grid */
    min-width: 0;
    padding: 1.2rem 1.3rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    height: 100%;
}

.tla-ar-panel.is-center {
    border-color: var(--gold-soft);
    background: linear-gradient(180deg, #fff, #FEFCF7);
}

.tla-ar-panel-head {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding-bottom: .9rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.tla-ar-panel-ico {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.tla-ar-panel-ico.act { background: #E8EEF9; }
.tla-ar-panel-ico.arc { background: var(--gold-soft); }
.tla-ar-panel-ico.dv  { background: var(--leaf-soft); }

.tla-ar-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.tla-ar-panel-head p {
    margin: .1rem 0 0;
    font-size: .8rem;
    color: var(--ink-mute);
    line-height: 1.5;
}

.tla-ar-panel-sub {
    margin: 1.1rem 0 .6rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--rust);
}

.tla-ar-panel-empty {
    padding: 1.6rem 1rem;
    border: 1px dashed var(--line);
    border-radius: 12px;
    text-align: center;
    font-size: .87rem;
    color: var(--ink-mute);
}

.tla-ar-panel-more {
    margin-top: auto;
    padding-top: .9rem;
    font-size: .85rem;
    color: var(--rust);
    text-decoration: none;
}

.tla-ar-panel-more:hover { text-decoration: underline; }

/* ── ซ้าย: ข่าวสาร ────────────────────────────────────────────── */

/* แถบข่าวล่าสุด */
.tla-ar-breaking {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .6rem;
    margin-bottom: .8rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(154, 91, 56, .10), rgba(154, 91, 56, 0));
    font-size: .82rem;
}

.tla-ar-breaking-tag {
    flex: 0 0 auto;
    padding: .16rem .6rem;
    border-radius: 999px;
    background: var(--rust);
    color: #fff;
    font-size: .72rem;
}

/* หลายข่าวต่อกันในแถบเดียว ไม่ให้ดันความกว้างของการ์ด
   ส่วนที่เกินจะถูกตัด และไล่จางที่ปลายแถบเพื่อบอกว่ายังมีต่อ */
.tla-ar-breaking-track {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
            mask-image: linear-gradient(90deg, #000 82%, transparent);
}

.tla-ar-breaking-track a + a::before {
    content: "·";
    margin: 0 .5rem;
    color: var(--ink-mute);
}

.tla-ar-breaking a {
    color: var(--ink);
    text-decoration: none;
}

.tla-ar-breaking a:hover { color: var(--rust); }

/* ปุ่มค้นหาขั้นสูงในแถบค้นหา */
.tla-ar-search .tla-ar-btn.ghost {
    background: var(--paper-2);
    border-color: var(--line);
    color: var(--ink-soft);
}

.tla-ar-search .tla-ar-btn.ghost:hover { background: #fff; color: var(--rust); }

/* แถบหมวดข่าว */
.tla-ar-cattabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .9rem;
}

.tla-ar-cattabs a {
    padding: .25rem .75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: .78rem;
    color: var(--ink-soft);
    text-decoration: none;
    transition: all .18s ease;
}

.tla-ar-cattabs a:hover { border-color: var(--gold); color: var(--rust); }
.tla-ar-cattabs a.on { background: var(--rust); border-color: var(--rust); color: #fff; }

/* รายการข่าว — ภาพย่อซ้าย เนื้อหาขวา */
.tla-ar-news { list-style: none; margin: 0; padding: 0; }

.tla-ar-news li {
    padding: .6rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tla-ar-news li + li { margin-top: .5rem; }

.tla-ar-news li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--gold);
}

.tla-ar-news a {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    color: inherit;
    text-decoration: none;
}

.tla-ar-news-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--paper-2) center/cover no-repeat;
    font-size: 1.1rem;
}

.tla-ar-news-body { min-width: 0; }

.tla-ar-news-cat {
    display: inline-block;
    margin-bottom: .25rem;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--gold-soft);
    color: #7A6224;
    font-size: .7rem;
    line-height: 1.6;
}

.tla-ar-news b {
    display: block;
    font-size: .87rem;
    font-weight: 500;
    line-height: 1.5;
}

.tla-ar-news a:hover b { color: var(--rust); }

.tla-ar-news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .3rem;
    font-size: .73rem;
    color: var(--ink-mute);
}

/* ตัวเลขสรุปใต้รายการข่าว */
.tla-ar-newsstat {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin-top: .9rem;
}

.tla-ar-newsstat > div {
    padding: .65rem .4rem;
    border-radius: 11px;
    background: var(--paper-2);
    text-align: center;
}

.tla-ar-newsstat b {
    display: block;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--rust);
    line-height: 1.25;
}

.tla-ar-newsstat span { font-size: .72rem; color: var(--ink-mute); }

/* ── กลาง: คลังจดหมายเหตุ ─────────────────────────────────────── */
.tla-ar-omeka-hero {
    padding: 1.1rem;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--paper-2), #fff);
    border: 1px solid var(--gold-soft);
    text-align: center;
}

.tla-ar-omeka-hero > b {
    display: block;
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--rust);
    line-height: 1.2;
}

.tla-ar-omeka-hero > span {
    font-size: .84rem;
    color: var(--ink-soft);
}

.tla-ar-omeka-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .7rem;
}

.tla-ar-omeka-badges span {
    padding: .18rem .6rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: .74rem;
    color: var(--ink-soft);
}

.tla-ar-colls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.tla-ar-coll {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .6rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: all .18s ease;
}

.tla-ar-coll:hover { border-color: var(--gold); transform: translateY(-2px); }

.tla-ar-coll-thumb {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 1.05rem;
    background: var(--paper-2) center/cover no-repeat;
}

/* ไล่เฉดสีประจำคอลเลกชัน ให้แต่ละชุดแยกจากกันด้วยสายตา */
.tla-ar-coll-thumb.sk-a { background: linear-gradient(135deg, #EFE0C4, #E2CDA4); }
.tla-ar-coll-thumb.sk-b { background: linear-gradient(135deg, #DCE6D5, #C6D8BC); }
.tla-ar-coll-thumb.sk-c { background: linear-gradient(135deg, #E8DCD3, #D9C6B8); }
.tla-ar-coll-thumb.sk-d { background: linear-gradient(135deg, #E1E3EE, #CBD0E3); }
.tla-ar-coll-thumb.sk-e { background: linear-gradient(135deg, #EDE1E1, #DCC7C7); }
.tla-ar-coll-thumb.sk-f { background: linear-gradient(135deg, #E6E2D2, #D3CDB4); }

.tla-ar-coll b {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.45;
}

.tla-ar-coll > span:last-child > span {
    font-size: .72rem;
    color: var(--ink-mute);
}

.tla-ar-omeka-list { list-style: none; margin: 0; padding: 0; }

.tla-ar-omeka-list li + li {
    margin-top: .55rem;
    padding-top: .55rem;
    border-top: 1px dashed var(--line);
}

.tla-ar-omeka-list a {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: inherit;
    text-decoration: none;
}

.tla-ar-omeka-thumb {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--paper-2) center/cover no-repeat;
    font-size: 1.15rem;
}

.tla-ar-omeka-list b {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.5;
}

.tla-ar-omeka-list a:hover b { color: var(--rust); }

/* ── ขวา: Dataverse ───────────────────────────────────────────── */
.tla-ar-dv-stat {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    margin-bottom: .9rem;
}

.tla-ar-dv-stat > div {
    padding: .7rem .5rem;
    border-radius: 11px;
    background: var(--paper-2);
    text-align: center;
}

.tla-ar-dv-stat b {
    display: block;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--leaf);
}

.tla-ar-dv-stat span { font-size: .75rem; color: var(--ink-mute); }

.tla-ar-dv-deposit {
    padding: 1.1rem .9rem;
    border: 1px dashed var(--leaf);
    border-radius: 13px;
    background: var(--leaf-soft);
    text-align: center;
}

.tla-ar-dv-deposit .big { display: block; font-size: 1.5rem; }

.tla-ar-dv-deposit b {
    display: block;
    margin: .25rem 0 .2rem;
    font-size: .92rem;
    color: #40562F;
}

.tla-ar-dv-deposit > span {
    display: block;
    margin-bottom: .7rem;
    font-size: .78rem;
    line-height: 1.6;
    color: #55703F;
}

/**
 * ปุ่มฝากวัตถุดิจิทัล — เขียวเข้มกว่า --leaf เล็กน้อย
 *
 * ตัวอักษรขาวบนเขียวใบไม้ (--leaf #6E8B54) ได้อัตราส่วนความต่างสี 3.83
 * ซึ่งต่ำกว่าเกณฑ์ 4.5 ของข้อความขนาดปกติ #63794A ได้ 4.83 โดยยังคงโทนใบไม้เดิม
 */
.tla-ar-dv-deposit .tla-ar-btn {
    padding: .45rem 1.2rem;
    font-size: .85rem;
    background: #63794A;
    text-decoration: none;
}

.tla-ar-dv-deposit .tla-ar-btn:hover { background: #55693F; }

.tla-ar-dv-list { list-style: none; margin: 0; padding: 0; }

.tla-ar-dv-list li + li {
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px dashed var(--line);
}

.tla-ar-dv-list a {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    color: inherit;
    text-decoration: none;
}

/* ภาพปกของ dataset — Search API ให้มาที่ image_url (/api/datasets/{id}/logo) */
.tla-ar-dv-thumb {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--paper-2) center/cover no-repeat;
    font-size: 1.15rem;
}

.tla-ar-dv-info { min-width: 0; }

.tla-ar-dv-list b {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.5;
}

.tla-ar-dv-meta {
    display: block;
    margin-top: .15rem;
    font-size: .74rem;
    color: var(--ink-mute);
}

.tla-ar-dv-list a:hover b { color: var(--rust); }

.tla-ar-pid {
    display: block;
    margin-top: .15rem;
    font-family: ui-monospace, monospace;
    font-size: .72rem;
    color: var(--ink-mute);
    word-break: break-all;
}

/* ── ค้นหาขั้นสูง ─────────────────────────────────────────────── */
.tla-ar-adv-toggle {
    padding: .3rem .85rem;
    border: 1px dashed var(--gold);
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    font: inherit;
    font-size: .82rem;
    color: var(--rust);
    cursor: pointer;
}

.tla-ar-adv-toggle:hover { background: #fff; }

.tla-ar-adv {
    max-width: 780px;
    margin: 1rem auto 0;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    text-align: left;
}

.tla-ar-adv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .9rem 1.1rem;
}

.tla-ar-adv label { display: block; }

.tla-ar-adv label > span:first-child {
    display: block;
    margin-bottom: .3rem;
    font-size: .82rem;
    color: var(--ink-soft);
}

.tla-ar-adv input {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    font: inherit;
    font-size: .88rem;
    color: var(--ink);
}

.tla-ar-adv input:focus { outline: none; border-color: var(--gold); background: #fff; }

.tla-ar-adv-range {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.tla-ar-adv-range i { color: var(--ink-mute); font-style: normal; }

.tla-ar-adv-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 1.1rem;
    padding-top: .9rem;
    border-top: 1px dashed var(--line);
}

.tla-ar-adv-actions .tla-ar-btn { padding: .5rem 1.3rem; font-size: .88rem; }

/* ── แบ่งหน้า (Kendo Pager) ───────────────────────────────────── */
.tla-ar-pager {
    margin-top: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.tla-ar-pager.k-pager {
    padding: .5rem .8rem;
    color: var(--ink-soft);
    font-family: inherit;
}

.tla-ar-pager .k-pager-numbers .k-selected,
.tla-ar-pager .k-pager-numbers .k-state-selected {
    background: var(--rust);
    border-color: var(--rust);
    color: #fff;
}

.tla-ar-pager .k-pager-info { color: var(--ink-mute); }

/* ── มุมมองเส้นเวลา ───────────────────────────────────────────── */
.tla-ar-tl {
    list-style: none;
    margin: 0;
    padding: .5rem 0 0 1.4rem;
    border-left: 2px solid var(--gold-soft);
}

.tla-ar-tl li { position: relative; padding: 0 0 1.4rem 1.2rem; }

.tla-ar-tl-dot {
    position: absolute;
    left: -1.75rem;
    top: .25rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(194, 161, 74, .22);
}

.tla-ar-tl-year {
    display: block;
    margin-bottom: .4rem;
    font-size: .92rem;
    color: var(--rust);
}

.tla-ar-tl-card {
    display: flex;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
    padding: .75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
    font-size: .88rem;
    color: var(--ink-soft);
}

.tla-ar-tl-btn {
    margin-left: auto;
    padding: .35rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-2);
    font: inherit;
    font-size: .82rem;
    color: var(--rust);
    cursor: pointer;
}

.tla-ar-tl-btn:hover { border-color: var(--gold); background: #fff; }

/* ── มุมมองแผนที่ ─────────────────────────────────────────────── */
.tla-ar-mapwrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 820px) {
    .tla-ar-mapwrap { grid-template-columns: 1fr; }
}

#ar-map {
    height: 460px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
}

.tla-ar-mapside {
    max-height: 460px;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.tla-ar-mapside h5 {
    margin: 0 0 .7rem;
    font-size: .88rem;
    color: var(--rust);
}

.tla-ar-mapitem {
    display: block;
    padding: .55rem .7rem;
    margin-bottom: .4rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    cursor: pointer;
    transition: all .18s ease;
}

.tla-ar-mapitem:hover { border-color: var(--gold); background: #fff; }

.tla-ar-mapitem b {
    display: block;
    font-size: .84rem;
    font-weight: 500;
    line-height: 1.5;
}

.tla-ar-mapitem span { font-size: .76rem; color: var(--ink-mute); }

/* ── แถบสถิติ ─────────────────────────────────────────────────── */
.tla-ar-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin: 2.4rem 0 3rem;
}

.tla-ar-stat {
    padding: 1.3rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}

.tla-ar-stat b {
    display: block;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--rust);
    line-height: 1.2;
}

.tla-ar-stat span {
    font-size: .85rem;
    color: var(--ink-mute);
}

/* ── หัวข้อของแต่ละส่วน ───────────────────────────────────────── */
.tla-ar-sechead {
    text-align: center;
    margin-bottom: 1.8rem;
}

.tla-ar-sechead h2 {
    margin: .7rem 0 .35rem;
    font-size: clamp(1.25rem, 2.6vw, 1.7rem);
    font-weight: 600;
}

.tla-ar-sechead p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .93rem;
}

/* ── การ์ดหมวดหมู่ ────────────────────────────────────────────── */
.tla-ar-cats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 3.4rem;
}

.tla-ar-cat {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tla-ar-cat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

.tla-ar-cat.is-active {
    border-color: var(--rust);
    background: linear-gradient(180deg, #fff, var(--paper-2));
}

.tla-ar-cat-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--leaf-soft);
    font-size: 1.35rem;
    flex: 0 0 auto;
}

.tla-ar-cat b {
    display: block;
    font-weight: 500;
    font-size: .95rem;
}

.tla-ar-cat span {
    font-size: .82rem;
    color: var(--ink-mute);
}

/* ── โครงผลการค้นหา ───────────────────────────────────────────── */
.tla-ar-body-grid {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 1.6rem;
    align-items: start;
    padding-bottom: 4rem;
}

/**
 * ⚠️ minmax(0, 1fr) กับ min-width: 0 ห้ามเปลี่ยนเป็น 1fr เฉย ๆ
 *
 * ค่าต่ำสุดอัตโนมัติของกริดไอเท็มคือ min-content ไม่ใช่ 0 คอลัมน์ผลลัพธ์จึงหด
 * ได้ไม่ต่ำกว่าความกว้างของเนื้อหาที่แคบที่สุด (วัดได้ ~473px) เบราว์เซอร์บน
 * มือถือต้องซูมออกทั้งหน้าเพื่อให้พอดีจอ ตัวอักษรเลยเล็กลงทั้งหน้า
 * minmax(0, 1fr) ปลดค่าต่ำสุดนั้นออก ส่วน min-width: 0 กันไอเท็มลูกไม่ให้
 * ดันคอลัมน์กลับมากว้างอีก
 */
.tla-ar-body-grid > * { min-width: 0; }

@media (max-width: 900px) {
    .tla-ar-body-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── ตัวกรอง ──────────────────────────────────────────────────── */
.tla-ar-facets {
    position: sticky;
    top: 1rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .tla-ar-facets { position: static; }
}

.tla-ar-facet + .tla-ar-facet {
    margin-top: 1.3rem;
    padding-top: 1.3rem;
    border-top: 1px dashed var(--line);
}

.tla-ar-facet h5 {
    margin: 0 0 .7rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
}

.tla-ar-facet label {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .28rem 0;
    font-size: .87rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.tla-ar-facet label:hover { color: var(--rust); }

.tla-ar-facet input[type=checkbox] {
    accent-color: var(--rust);
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.tla-ar-facet .cnt {
    margin-left: auto;
    font-size: .78rem;
    color: var(--ink-mute);
}

.tla-ar-facet .more {
    margin-top: .4rem;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: .82rem;
    color: var(--rust);
    cursor: pointer;
}

/* แถบปีเป็นกราฟแท่งเล็ก ๆ */
.tla-ar-hist {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 54px;
    margin-bottom: .4rem;
}

.tla-ar-hist span {
    flex: 1;
    min-height: 3px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(180deg, var(--gold), var(--gold-soft));
    transition: background .18s ease;
}

.tla-ar-hist span:hover { background: var(--rust); }

.tla-ar-hist-lbl {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: var(--ink-mute);
}

/* ── แถบเครื่องมือเหนือผลลัพธ์ ────────────────────────────────── */
.tla-ar-toolbar {
    display: flex;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
    padding: .85rem 1.1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.tla-ar-found { font-size: .92rem; color: var(--ink-soft); }
.tla-ar-found b { color: var(--rust); font-size: 1.05rem; }

.tla-ar-didyou {
    font-size: .88rem;
    color: var(--ink-soft);
}

.tla-ar-didyou button {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--rust);
    text-decoration: underline;
    cursor: pointer;
}

.tla-ar-tools {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}

.tla-ar-select {
    padding: .45rem .8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: .86rem;
    color: var(--ink-soft);
}

.tla-ar-view {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.tla-ar-view button {
    padding: .45rem .9rem;
    border: 0;
    background: #fff;
    font: inherit;
    font-size: .84rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.tla-ar-view button.on { background: var(--rust); color: #fff; }

/* ดรอปดาวน์เรียงลำดับกับปุ่มสลับมุมมองสี่ปุ่มต่อกันเป็นแถวเดียวยาว 436px
   หดไม่ได้ พอจอแคบกว่านั้นให้ขึ้นบรรทัดใหม่แทนการดันแถบจนล้น */
@media (max-width: 575.98px) {
    .tla-ar-tools {
        flex-wrap: wrap;
        width: 100%;
        margin-left: 0;
    }

    .tla-ar-view { flex-wrap: wrap; border-radius: 14px; }
}

/* ── ป้ายตัวกรองที่เลือกอยู่ ──────────────────────────────────── */
.tla-ar-active {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}

.tla-ar-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .8rem;
    border-radius: 999px;
    background: var(--leaf-soft);
    color: #4C6438;
    font-size: .82rem;
}

.tla-ar-tag button {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    opacity: .65;
}

.tla-ar-tag button:hover { opacity: 1; }

/* ── รายการผลลัพธ์ ────────────────────────────────────────────── */
.tla-ar-results { display: grid; gap: .9rem; }

.tla-ar-results.is-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.tla-ar-item {
    display: flex;
    gap: 1.1rem;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tla-ar-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

.tla-ar-thumb {
    width: 108px;
    height: 108px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--paper-2) center/cover no-repeat;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    color: var(--ink-mute);
    overflow: hidden;
}

.tla-ar-item h3 {
    margin: 0 0 .35rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

.tla-ar-item h3 mark {
    background: rgba(194, 161, 74, .28);
    color: inherit;
    padding: 0 .1em;
    border-radius: 3px;
}

.tla-ar-desc {
    margin: 0 0 .5rem;
    font-size: .87rem;
    line-height: 1.7;
    color: var(--ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tla-ar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    font-size: .78rem;
}

.tla-ar-badge {
    padding: .18rem .6rem;
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--ink-soft);
}

.tla-ar-badge.type { background: var(--gold-soft); color: #7A6224; }
.tla-ar-badge.year { background: var(--leaf-soft); color: #4C6438; }
.tla-ar-badge.dv   { background: #E7E2F3; color: #58489B; }

/* เนื้อหาของการ์ด — สูงเต็มใบเพื่อให้แถวปุ่มถูกดันไปติดขอบล่างได้ */
.tla-ar-item-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* แถวปุ่มท้ายการ์ด — ชิดขวาล่างเสมอ ไม่ว่าข้อความจะสั้นยาวแค่ไหน */
.tla-ar-item-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: .6rem;
}

/* ลิงก์ไปหน้าระเบียนที่ต้นทาง — อยู่ในการ์ดที่กดได้ทั้งใบ จึงทำให้เด่นพอจะเห็นว่าแยกกัน */
.tla-ar-src {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: .78rem;
    color: var(--rust);
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.tla-ar-src:hover,
.tla-ar-src:focus-visible {
    background: var(--rust);
    border-color: var(--rust);
    color: #fff;
}

.tla-ar-src span { font-size: .9em; }

/* มุมมองตาราง — รูปอยู่บน ข้อความอยู่ล่าง */
.tla-ar-results.is-grid .tla-ar-item { flex-direction: column; gap: .8rem; }
.tla-ar-results.is-grid .tla-ar-thumb { width: 100%; height: 148px; }
.tla-ar-results.is-grid .tla-ar-desc { -webkit-line-clamp: 3; }

/* ── สถานะว่าง / ผิดพลาด ──────────────────────────────────────── */
.tla-ar-empty {
    padding: 3.4rem 1.5rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .6);
    text-align: center;
    color: var(--ink-soft);
}

.tla-ar-empty b {
    display: block;
    margin-bottom: .4rem;
    font-size: 1.05rem;
    color: var(--ink);
}

.tla-ar-empty.is-error {
    border-color: #E2C0B4;
    background: #FCF2EE;
    color: #8A4A34;
}

/* ── ปุ่มโหลดเพิ่ม ────────────────────────────────────────────── */
.tla-ar-more {
    display: block;
    margin: 1.6rem auto 0;
    padding: .7rem 2.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all .18s ease;
}

.tla-ar-more:hover { border-color: var(--gold); color: var(--rust); }
.tla-ar-more[disabled] { opacity: .5; cursor: default; }

/* ── โครงกระดูกตอนกำลังโหลด ───────────────────────────────────── */
.tla-ar-skel {
    height: 132px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, #F3ECDF 25%, #FAF6EC 50%, #F3ECDF 75%);
    background-size: 200% 100%;
    animation: tlaArShimmer 1.3s infinite;
}

@keyframes tlaArShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── หน้าต่างรายละเอียด ───────────────────────────────────────── */
.tla-ar-detail { font-family: 'Sarabun', 'Noto Sans Thai', sans-serif; color: #3E2C1C; }

.tla-ar-detail h2 {
    margin: 0 0 .3rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
}

.tla-ar-detail .en-title {
    margin: 0 0 1rem;
    font-size: .95rem;
    color: #6B5641;
}

.tla-ar-detail-body {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 1.4rem;
}

@media (max-width: 620px) {
    .tla-ar-detail-body { grid-template-columns: 1fr; }
}

.tla-ar-detail-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    background: #F5EEE1 center/cover no-repeat;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    color: #92806B;
}

.tla-ar-dl {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: .5rem 1rem;
    margin: 0;
    font-size: .9rem;
    line-height: 1.75;
}

.tla-ar-dl dt { color: #92806B; }
.tla-ar-dl dd { margin: 0; color: #3E2C1C; word-break: break-word; }

.tla-ar-detail-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid #E5D9C3;
}

/* ═══════════════════════════════════════════════════════════════════════
   เส้นเวลาเรื่องเล่า (TimelineJS3)

   timeline.css ของ Knight Lab โหลดมาก่อนไฟล์นี้ (ดู archive/_head.php)
   ด้านล่างจึงเป็นการเปลี่ยนสีและตัวอักษรให้เข้าชุดกระดาษสาเท่านั้น
   ไม่ได้แตะการจัดวางของมัน — ทุกกฎขึ้นต้นด้วย .tla-ar-story เสมอ
   เพื่อไม่ให้หลุดไปโดนเส้นเวลาอันอื่นถ้าวันหน้ามีอีกจุดในเว็บ
   ═══════════════════════════════════════════════════════════════════════ */

/* ── แถบเลือกช่วงปี (Kendo RangeSlider) ──────────────────────── */
.tla-ar-range {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-top: 1.6rem;
    padding: .9rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 0;
    background: linear-gradient(180deg, var(--paper-2), #fff);
}

@media (max-width: 767.98px) {
    .tla-ar-range {
        flex-wrap: wrap;
        gap: .7rem 1rem;
        border-radius: var(--radius);
        border-bottom: 1px solid var(--line);
        margin-bottom: .8rem;
    }
}

.tla-ar-range-label {
    flex: none;
    font-size: .88rem;
    font-weight: 500;
    color: var(--ink-soft);
}

/* แถบเลื่อนต้องยืดได้ ส่วนที่เหลือในแถวกว้างคงที่ */
.tla-ar-range-slider {
    flex: 1;
    min-width: 180px;
}

.tla-ar-range-slider .k-slider { width: 100%; }

.tla-ar-range-value {
    flex: none;
    min-width: 11ch;
    font-size: .88rem;
    color: var(--rust);
    text-align: right;
}

.tla-ar-range .tla-ar-btn {
    flex: none;
    padding: .4rem 1.1rem;
    font-size: .85rem;
}

/* ── กล่องเส้นเวลา ───────────────────────────────────────────── */
.tla-ar-story {
    position: relative;
    margin-top: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ต่อกับแถบเลือกช่วงปีให้เป็นกล่องเดียว เมื่อแถบนั้นแสดงอยู่ */
.tla-ar-range:not([hidden]) + .tla-ar-story {
    margin-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
}

@media (max-width: 767.98px) {
    .tla-ar-range:not([hidden]) + .tla-ar-story { border-radius: var(--radius); }
}

/**
 * ความสูงของกล่องเส้นเวลา
 *
 * ⚠️ ผูกกับ id ไม่ใช่คลาส .tla-ar-story-tl — ห้ามเปลี่ยนกลับ
 *
 *    TimelineJS "เขียนทับ" className ของกล่องตอนสร้าง (เป็น "tl-timeline
 *    tl-layout-landscape") คลาสของเราจึงหลุดหายไปทันทีที่สร้างเสร็จ
 *    ครั้งแรกยังไม่มีปัญหาเพราะมันวัดความสูงก่อนเขียนทับ แล้วกำหนดความสูง
 *    ให้ลูก ๆ เป็นตัวเลขไปเลย แต่พอสร้างใหม่ (ตอนเลือกช่วงปี) กล่องไม่เหลือ
 *    กฎความสูงแล้ว จึงวัดได้เตี้ยมาก ผลคือส่วนรูปกับเนื้อหายุบหาย
 *    เหลือแต่แถบเลื่อนด้านล่าง
 *
 *    id ไม่ถูกแตะ กฎที่ผูกกับ id จึงอยู่รอดทุกครั้งที่สร้างใหม่
 *    (คลาสในไฟล์ view ยังคงไว้เพื่อให้อ่าน HTML แล้วรู้ว่ากล่องนี้คืออะไร)
 */
#ar-story-tl {
    height: 640px;
    width: 100%;
}

@media (max-width: 900px) { #ar-story-tl { height: 560px; } }
@media (max-width: 575.98px) { #ar-story-tl { height: 480px; } }

/* ── ข้อความสถานะ — ลอยทับกล่อง ไม่ได้แทนที่ ─────────────────── */
.tla-ar-story-state {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    padding: 2rem;
    background: var(--paper);
    color: var(--ink-soft);
    text-align: center;
}

.tla-ar-story-state.is-on { display: flex; }

.tla-ar-story-spin {
    width: 30px;
    height: 30px;
    border: 3px solid var(--gold-soft);
    border-top-color: var(--rust);
    border-radius: 50%;
    animation: tla-ar-story-turn .9s linear infinite;
}

@keyframes tla-ar-story-turn { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .tla-ar-story-spin { animation-duration: 3s; }
}

.tla-ar-story-foot {
    display: none;
    margin: .7rem 0 4rem;
    font-size: .85rem;
    color: var(--ink-mute);
    text-align: center;
}

/* ── ตัวอักษรและสีของ TimelineJS ─────────────────────────────── */
.tla-ar-story .tl-timeline,
.tla-ar-story .tl-timeline h1,
.tla-ar-story .tl-timeline h2,
.tla-ar-story .tl-timeline h3,
.tla-ar-story .tl-timeline h4,
.tla-ar-story .tl-timeline p,
.tla-ar-story .tl-timeline .tl-headline,
.tla-ar-story .tl-timeline .tl-text-content {
    font-family: var(--arc-ff);
    color: var(--ink);
}

.tla-ar-story .tl-slide { background: var(--paper); }

/* วันที่เหนือหัวสไลด์ — เป็น พ.ศ. ที่ส่งมาจาก display_date */
.tla-ar-story .tl-headline-date {
    font-family: var(--arc-ff-display);
    color: var(--rust);
    text-transform: none;
}

.tla-ar-story .tl-text-content a { color: var(--rust); }
.tla-ar-story .tl-text-content a:hover { color: var(--rust-deep); }

/* ลิงก์ไปต้นฉบับท้ายสไลด์ — ประกอบมาจากฝั่งเซิร์ฟเวอร์ (OmekaSSource) */
.tla-ar-story .tla-ar-story-link {
    margin-top: 1.1rem;
    padding-top: .9rem;
    border-top: 1px dashed var(--line);
}

.tla-ar-story .tla-ar-story-link a { font-weight: 500; }

.tla-ar-story .tl-caption,
.tla-ar-story .tl-credit { color: var(--ink-mute); }

/* ── แถบเลื่อนเวลาด้านล่าง ───────────────────────────────────── */
.tla-ar-story .tl-timenav {
    background-color: var(--paper-2);
    border-top: 1px solid var(--line);
}

.tla-ar-story .tl-timenav .tl-timenav-line { background: var(--gold); }

.tla-ar-story .tl-timemarker .tl-timemarker-content-container {
    background-color: #fff;
    border: 1px solid var(--line);
}

.tla-ar-story .tl-timemarker.tl-timemarker-active .tl-timemarker-content-container {
    background-color: var(--paper-deep);
    border-color: var(--gold);
}

.tla-ar-story .tl-timemarker .tl-timemarker-line-left,
.tla-ar-story .tl-timemarker .tl-timemarker-line-right {
    border-color: var(--line);
    background: var(--line);
}

.tla-ar-story .tl-timemarker.tl-timemarker-active .tl-timemarker-line-left,
.tla-ar-story .tl-timemarker.tl-timemarker-active .tl-timemarker-line-right {
    border-color: var(--rust);
    background: var(--rust);
}

.tla-ar-story .tl-timegroup-message,
.tla-ar-story .tl-timeaxis .tl-timeaxis-tick .tl-timeaxis-tick-text { color: var(--ink-mute); }

/* ── ปุ่มลูกศรซ้าย/ขวา และปุ่มย่อ–ขยาย ───────────────────────── */
.tla-ar-story .tl-slidenav-content-container .tl-slidenav-title,
.tla-ar-story .tl-slidenav-content-container .tl-slidenav-description { color: var(--ink-soft); }

/**
 * ตัดชื่อสไลด์ข้าง ๆ ให้เหลือสองบรรทัด
 *
 * timeline.css ตั้ง -webkit-line-clamp: 2 ไว้แล้ว แต่ลืมใส่ display:-webkit-box
 * กับ overflow:hidden ซึ่งเป็นเงื่อนไขที่ line-clamp ต้องมีถึงจะทำงาน ชื่อยาว ๆ
 * (ซึ่งชื่อเอกสารจดหมายเหตุภาษาไทยยาวแทบทุกชิ้น) จึงไหลลงมาเป็นแถบผอมสูง
 * เต็มขอบจอ เติมสองบรรทัดที่ขาดให้ครบ ไม่ได้แก้ไฟล์ของ Knight Lab
 */
.tla-ar-story .tl-slidenav-title,
.tla-ar-story .tl-slidenav-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tla-ar-story .tl-slidenav-icon { color: var(--rust); }

.tla-ar-story .tl-menubar {
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-left: 0;
}

.tla-ar-story .tl-menubar-button { color: var(--ink-soft); }
.tla-ar-story .tl-menubar-button:hover { color: var(--rust); }

.tla-ar-story .tl-attribution a { color: var(--ink-mute); }

/* ── แถบทางเข้าเรื่องเล่าบนแผนที่ ─────────────────────────────── */
.tla-ar-smap {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin: 1.6rem 0 4rem;
    padding: 1.6rem 1.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(420px 220px at 92% 120%, rgba(110, 139, 84, .10), transparent 70%),
        linear-gradient(180deg, #fff, var(--paper-2));
    box-shadow: var(--shadow);
}

@media (max-width: 575.98px) {
    .tla-ar-smap { flex-direction: column; align-items: flex-start; padding: 1.3rem; }
}

.tla-ar-smap .tla-ar-btn { flex: none; }

.tla-ar-smap-note {
    max-width: 46ch;
    font-size: .9rem;
    color: var(--ink-soft);
}
