@charset "utf-8";
/* =========================================================
   NẾP VIỆT — DÒNG THỜI GIAN DẠNG INFOGRAPHIC
   Sợi chỉ đỏ uốn khúc qua 8 hàng (mỗi hàng một chương), mỗi mốc là một nút trên sợi chỉ.
   Điện thoại: sợi chỉ chạy dọc.
   ========================================================= */
.ig { padding: clamp(28px, 4vw, 56px) var(--m) 0; --ly: 112px; --cx: 40px; }
.ig-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 8px 32px; margin-bottom: 22px; }
.ig-head h1, .ig-head h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem); grid-row: span 2; }
.ig-stats { font-size: 0.9375rem; color: var(--muted); }
.ig-stats b { font: 500 1.5rem/1 var(--serif); color: var(--son); margin-left: 10px; }
.ig-stats b:first-child { margin-left: 0; }
.pt-turn { display: inline-block; width: 9px; height: 9px; background: var(--son); transform: rotate(45deg); margin-left: 12px; }

/* dải chương */
.ig-ribbon { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); background: var(--cham); margin: 0 calc(-1 * var(--m)) clamp(28px, 4vw, 56px); }
.ig-ribbon a { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px 12px; color: var(--paper); text-decoration: none; border-right: 1px solid rgba(245, 241, 232, 0.14); transition: background-color 200ms; }
.ig-ribbon a:last-child { border-right: 0; }
.ig-ribbon .roman { font-size: 1.25rem; color: #e8a79c; }
.ig-ribbon b { font: 400 0.9375rem/1.3 var(--serif); }
.ig-ribbon small { font-size: 0.8125rem; color: rgba(245, 241, 232, 0.72); line-height: 1.35; }
.ig-ribbon a:hover { background: rgba(245, 241, 232, 0.08); }
.ig-ribbon a[aria-current] { background: var(--son); }
.ig-ribbon a[aria-current] .roman { color: var(--paper); }
.ig-ribbon a:focus-visible { outline-color: var(--paper); outline-offset: -4px; }

/* hàng chương và khúc quanh */
.ig-path { position: relative; }
.ig-row { position: relative; padding: 20px calc(var(--cx) + 24px) 28px; scroll-margin-top: 80px; }
.ig-row:not(:last-child)::after { content: ""; position: absolute; top: calc(20px + var(--ly) - 1.5px); height: 100%; width: var(--cx); right: 24px; border: 3px solid var(--son); border-left: 0; border-radius: 0 var(--cx) var(--cx) 0; pointer-events: none; }
.ig-row.rev:not(:last-child)::after { right: auto; left: 24px; border-left: 3px solid var(--son); border-right: 0; border-radius: var(--cx) 0 0 var(--cx); }

.ig-line { position: relative; display: flex; align-items: flex-start; }
.ig-row.rev .ig-line { flex-direction: row-reverse; }
.ig-line::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--ly) - 1.5px); height: 3px; background: var(--son); transform-origin: 0 50%; }
.ig-row.rev .ig-line::before { transform-origin: 100% 50%; }

/* nút chương */
.ig-flag { position: relative; flex: none; width: clamp(190px, 17vw, 250px); margin-top: calc(var(--ly) - 28px); padding: 0 18px 0 0; }
.ig-row.rev .ig-flag { padding: 0 0 0 18px; }
.ig-flag .roman { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--cham); color: var(--paper); font-size: 1.25rem; box-shadow: 0 0 0 6px var(--paper); position: relative; z-index: 1; }
.ig-row.active .ig-flag .roman { background: var(--son); }
.ig-flag h2 { font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.4rem); line-height: 1.25; margin-top: 14px; }
.ig-range { font-size: 0.875rem; color: var(--muted); margin-top: 4px; }
.ig-count { font-size: 0.8125rem; color: var(--son); margin-top: 6px; }
.ig-flag a { display: inline-block; margin-top: 8px; font-size: 0.875rem; }
.ig-flag a:hover { color: var(--son); }

/* các mốc */
.ig-track { list-style: none; margin: 0; padding: 0; display: flex; flex: 1; min-width: 0; }
.ig-row.rev .ig-track { flex-direction: row-reverse; }
.ig-stop { flex: 1 1 0; min-width: 0; }
.ig-stop button { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0 6px 6px; background: none; border: 0; cursor: pointer; text-align: center; color: var(--ink); }
.ig-thumbs { display: flex; justify-content: center; height: 64px; margin-bottom: 8px; }
.ig-thumbs img { width: 56px; height: 56px; margin-top: 4px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; background: var(--white); border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(36, 34, 31, 0.5); transition: transform 300ms var(--ease); }
.ig-thumbs img + img { margin-left: -22px; }
.ig-thumbs.empty::before { content: ""; width: 28px; height: 28px; margin-top: 18px; border-radius: 50%; border: 1px dashed var(--line); }
.ig-year { height: 24px; display: inline-flex; align-items: center; padding: 0 8px; margin-bottom: 8px; background: var(--cham); color: var(--paper); font-size: 0.8125rem; font-variant-numeric: lining-nums; white-space: nowrap; border-radius: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ig-stop.has .ig-year { background: var(--son); }
.ig-dot { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--cham); transition: transform 200ms var(--ease); }
.ig-stop.has .ig-dot { background: var(--son); border-color: var(--son); }
.ig-stop.turning .ig-dot { border-radius: 0; transform: rotate(45deg); background: var(--son); border-color: var(--son); }
.ig-name { margin-top: 10px; font: 400 0.9375rem/1.3 var(--serif); text-wrap: balance; }
.ig-type { margin-top: 3px; font-size: 0.8125rem; color: var(--muted); line-height: 1.35; }
.ig-stop button:hover .ig-name, .ig-stop.on .ig-name { color: var(--son); }
.ig-stop button:hover .ig-dot { transform: scale(1.25); }
.ig-stop.turning button:hover .ig-dot { transform: rotate(45deg) scale(1.25); }
.ig-stop button:hover .ig-thumbs img { transform: translateY(-3px); }
.ig-stop.on .ig-dot { box-shadow: 0 0 0 5px rgba(164, 59, 48, 0.22); }

/* bảng chi tiết mốc */
.ig-detail { margin: 18px 0 0; padding: 20px 22px; background: var(--white); border-top: 3px solid var(--son); }
.ig-detail[hidden] { display: none; }
.ig-d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 10px; }
.ig-d-head h3 { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem); }
.ig-d-meta { font-size: 0.875rem; color: var(--muted); margin-top: 2px; }
.ig-detail > p { color: var(--muted); max-width: 70ch; margin-top: 6px; }
.ig-d-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; margin-top: 14px; }
.ig-d-cards a { text-decoration: none; display: block; }
.ig-d-cards .media { border-top: 3px solid var(--tint); background: var(--paper); }
.ig-d-cards b { display: block; margin-top: 8px; font: 400 0.9375rem/1.3 var(--serif); }
.ig-d-cards span { font-size: 0.8125rem; color: var(--son); }
.ig-d-cards a:hover b { color: var(--son); }
.ig-d-empty { font-style: italic; }

/* dải song song */
.ig-gantt { margin: 18px 0 0; padding: 12px 16px 14px; background: rgba(37, 60, 73, 0.05); }
.ig-gantt summary { cursor: pointer; font-size: 0.875rem; color: var(--cham); font-weight: 500; }
.ig-g-axis { display: flex; justify-content: space-between; margin: 10px 0 4px clamp(140px, 22%, 260px); font-size: 0.8125rem; color: var(--muted); font-variant-numeric: lining-nums; }
.ig-g-row { display: grid; grid-template-columns: clamp(140px, 22%, 260px) 1fr; align-items: center; min-height: 26px; }
.ig-g-name { font-size: 0.8125rem; padding-right: 12px; line-height: 1.3; }
.ig-g-track { position: relative; height: 26px; border-left: 1px solid var(--line); background: linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat; }
.ig-g-bar { position: absolute; top: 50%; height: 8px; margin-top: -4px; background: var(--cham); }
.ig-g-bar.has { background: var(--son); }
.ig-g-bar.cont::after { content: ""; position: absolute; right: -8px; top: -2px; border: 6px solid transparent; border-left: 8px solid var(--cham); border-right: 0; }

/* cờ của chương */
.ig-flags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ig-flags figure { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--muted); }
.ig-flags img { height: 34px; width: auto; max-width: 56px; box-shadow: 0 0 0 1px var(--line); background: var(--white); }
.ig-flags .phuc-dung img { opacity: 0.9; }

/* chuyển động: chỉ đỏ vẽ ra, mốc hiện so le */
@media (prefers-reduced-motion: no-preference) {
  .ig-row .ig-line::before { transform: scaleX(0); transition: transform 900ms var(--ease); }
  .ig-row.in .ig-line::before { transform: none; }
  .ig-row .ig-stop, .ig-row .ig-flag { opacity: 0; transform: translateY(10px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
  .ig-row.in .ig-stop, .ig-row.in .ig-flag { opacity: 1; transform: none; }
  .ig-row.in .ig-stop:nth-child(2) { transition-delay: 60ms; }
  .ig-row.in .ig-stop:nth-child(3) { transition-delay: 120ms; }
  .ig-row.in .ig-stop:nth-child(4) { transition-delay: 180ms; }
  .ig-row.in .ig-stop:nth-child(5) { transition-delay: 240ms; }
  .ig-row.in .ig-stop:nth-child(n+6) { transition-delay: 300ms; }
}

/* máy tính bảng: hàng dài thì cuộn ngang */
@media (max-width: 1099px) {
  .ig-ribbon { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
  .ig-stop { min-width: 104px; }
  .ig-line { overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .ig-flag { width: 180px; }
}

/* điện thoại: sợi chỉ chạy dọc */
@media (max-width: 759px) {
  .ig-head { grid-template-columns: 1fr; }
  .ig-head h1, .ig-head h2 { grid-row: auto; }
  .ig-row { padding: 0; }
  .ig-row:not(:last-child)::after { display: none; }
  .ig-line, .ig-row.rev .ig-line { flex-direction: column; overflow: visible; padding-bottom: 0; }
  .ig-line::before { left: 26px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; transform-origin: 50% 0; }
  .ig-row.rev .ig-line::before { transform-origin: 50% 0; }
  .ig-flag, .ig-row.rev .ig-flag { width: auto; margin: 0; padding: 18px 0 14px; display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; align-items: center; }
  .ig-flag .roman { grid-row: span 5; align-self: start; }
  .ig-flag h2 { margin-top: 0; }
  .ig-flag > :not(.roman) { grid-column: 2; }
  .ig-track, .ig-row.rev .ig-track { flex-direction: column; width: 100%; }
  .ig-stop { min-width: 0; }
  .ig-stop button { display: grid; grid-template-columns: 56px auto 1fr; grid-template-areas: "dot year thumbs" "dot name name" "dot type type"; align-items: center; column-gap: 10px; text-align: left; padding: 10px 0; }
  .ig-dot { grid-area: dot; justify-self: center; align-self: start; margin-top: 4px; }
  .ig-year { grid-area: year; margin: 0; justify-self: start; }
  .ig-thumbs { grid-area: thumbs; height: 44px; margin: 0; justify-content: flex-end; }
  .ig-thumbs img { width: 40px; height: 40px; margin-top: 2px; }
  .ig-thumbs img + img { margin-left: -14px; }
  .ig-thumbs.empty::before { display: none; }
  .ig-name { grid-area: name; margin-top: 4px; }
  .ig-type { grid-area: type; }
  .ig-detail, .ig-gantt { margin-left: 56px; }
  .ig-g-axis { margin-left: 0; }
  .ig-g-row { grid-template-columns: 1fr; }
  .ig-g-name { padding: 6px 0 0; }
}
@media (max-width: 759px) and (prefers-reduced-motion: no-preference) {
  .ig-row .ig-line::before { transform: scaleY(0); }
  .ig-row.in .ig-line::before { transform: none; }
}
@media (max-width: 759px) {
  .ig-stop > .ig-detail { margin: 0 0 12px 56px; padding: 16px; }
  .ig-stop > .ig-detail .ig-d-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
/* cờ: bản lớn trong bảng chi tiết */
.ig-flags.big { gap: 16px; margin: 14px 0 4px; }
.ig-flags.big figure { align-items: flex-start; gap: 12px; max-width: 340px; }
.ig-flags.big img { height: 56px; max-width: 90px; }
.ig-flags.big figcaption { display: flex; flex-direction: column; gap: 2px; }
.ig-flags.big b { font: 400 0.9375rem/1.3 var(--serif); color: var(--ink); }
.ig-flags.big span { color: var(--son); }
.ig-flags.big small { font-size: 0.8125rem; line-height: 1.4; }
.ig-flags .phuc-dung img { outline: 1px dashed var(--muted); outline-offset: 2px; }
.ig-noflag { margin-top: 10px; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); font-style: italic; }
.ig-flags-legend { font-size: 0.8125rem; color: var(--muted); }
.pt-flag { display: inline-block; width: 16px; height: 11px; margin-left: 12px; background: var(--son); outline: 1px dashed var(--muted); outline-offset: 2px; vertical-align: -1px; }

/* ---------- bản đồ từng thời kỳ ---------- */
.ig-maps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ig-maps button { display: grid; gap: 2px; width: 64px; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); cursor: pointer; font: 500 0.6875rem/1.2 var(--sans); color: var(--ink); text-align: center; }
.ig-maps button:hover, .ig-maps button:focus-visible { border-color: var(--son); }
.ig-maps img { width: 100%; height: 82px; object-fit: cover; object-position: top; border-radius: 2px; background: #eaf0f2; }
.ig-map { margin: 16px 0 4px; max-width: 420px; }
.ig-map img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #eaf0f2; }
.ig-map figcaption { margin-top: 6px; font-size: 0.8125rem; color: rgba(36, 34, 31, 0.72); }
.map-zoom-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.map-zoom-hint { position: absolute; right: 8px; bottom: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(36, 34, 31, 0.78); color: var(--paper); font: 500 0.75rem/1.2 var(--sans); }
.mz { width: min(96vw, 1100px); height: min(94vh, 1000px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 6px; background: #eaf0f2; overflow: hidden; }
.mz::backdrop { background: rgba(20, 19, 17, 0.72); }
.mz-stage { position: absolute; inset: 0 0 56px; overflow: hidden; cursor: grab; touch-action: none; }
.mz-stage:active { cursor: grabbing; }
.mz-stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.mz-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; display: flex; gap: 8px; align-items: center; justify-content: center; background: var(--paper); border-top: 1px solid var(--line); }
.mz-bar button { min-width: 44px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font: 500 1rem/1 var(--sans); cursor: pointer; }
.mz-bar button:hover, .mz-bar button:focus-visible { border-color: var(--son); }
.mz-bar .mz-x { margin-left: 12px; background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- gọn hơn trên trang chủ và màn hình vừa ---------- */
.ig-home .ig-gantt { display: none; }
@media (max-width: 1023px) {
  .ig-head { grid-template-columns: 1fr; }
  .ig-head h1, .ig-head h2 { grid-row: auto; }
}
@media (max-width: 759px) {
  .ig-ribbon { scrollbar-width: none; }
  .ig-map { max-width: none; }
}

/* ---------- máy tính bảng & máy tính: thông tin chương lên trên, dải mốc chiếm trọn chiều ngang ---------- */
@media (min-width: 760px) {
  .ig-row { padding: 28px calc(var(--cx) + 12px) 32px; }
  .ig-line::before { display: none; }
  /* đường cong nối sang hàng sau; vị trí do JS đo (--line-y, --link-h) */
  .ig-row:not(:last-child)::after {
    display: block; box-sizing: border-box; top: calc(var(--line-y, 200px) - 1.5px); height: calc(var(--link-h, 300px) + 3px);
    width: var(--cx); right: 12px; left: auto; border: 3px solid var(--son); border-left: 0; border-radius: 0 var(--cx) var(--cx) 0;
  }
  .ig-row.rev:not(:last-child)::after { right: auto; left: 12px; border-left: 3px solid var(--son); border-right: 0; border-radius: var(--cx) 0 0 var(--cx); }
  .ig-line, .ig-row.rev .ig-line { flex-direction: column; align-items: stretch; overflow: visible; padding-bottom: 0; }
  .ig-flag, .ig-row.rev .ig-flag {
    width: auto; margin: 0 0 18px; padding: 0;
    display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px; align-items: center;
  }
  .ig-flag .roman { grid-row: 1 / span 3; align-self: start; }
  .ig-flag h2 { grid-column: 2; margin: 0; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem); }
  .ig-flag .ig-range, .ig-flag .ig-count, .ig-flag > a { grid-column: 2; margin-top: 0; }
  .ig-flag .ig-range { display: inline; }
  .ig-flag .ig-flags, .ig-flag .ig-noflag { grid-column: 2; margin-top: 8px; }
  .ig-flag .ig-noflag { max-width: 62ch; }
  .ig-flag .ig-maps { grid-column: 3; grid-row: 1 / span 6; align-self: start; margin-top: 0; justify-content: flex-end; max-width: 300px; }
  .ig-row.rev .ig-track { flex-direction: row-reverse; }
  .ig-track, .ig-row.rev .ig-track {
    width: 100%; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none;
    /* đường chỉ đỏ vẽ trên nền danh sách để chạy hết chiều dài khi vuốt ngang */
    background: linear-gradient(var(--son), var(--son)) 0 calc(var(--ly) - 1.5px) / 100% 3px no-repeat;
    background-attachment: local;
  }
  .ig-stop { flex: 1 0 132px; min-width: 132px; }
  .ig-year { max-width: none; overflow: visible; }
}
@media (min-width: 1280px) {
  .ig-stop { flex-basis: 150px; }
}

/* ---------- ẩn thanh cuộn, thay bằng mũi tên + viền mờ ---------- */
.ig-track, .ig-ribbon, .ig-line { scrollbar-width: none; -ms-overflow-style: none; }
.ig-track::-webkit-scrollbar, .ig-ribbon::-webkit-scrollbar, .ig-line::-webkit-scrollbar { display: none; }
@media (min-width: 760px) {
  .ig-track { padding-bottom: 0; cursor: grab; }
  .ig-track.dragging { cursor: grabbing; user-select: none; }
  .ig-track.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
  .ig-track.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
  .ig-track.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
  .ig-arrow { position: absolute; z-index: 3; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 1.125rem; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px -8px rgba(36, 34, 31, 0.45); display: grid; place-items: center; transition: opacity 200ms, border-color 160ms, color 160ms; }
  .ig-arrow:hover, .ig-arrow:focus-visible { border-color: var(--son); color: var(--son); }
  .ig-arrow.prev { left: -8px; }
  .ig-arrow.next { right: -8px; }
  .ig-arrow[hidden] { display: none; }
}

/* ---------- bảng chi tiết: bản đồ và dải thời gian song song đặt cạnh nhau ---------- */
.ig-d-media { margin: 16px 0 6px; }
.ig-d-media .ig-map { margin: 0; }
.ig-d-media .ig-gantt { margin: 0; }
.ig-d-media.two { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.ig-gantt.in-detail .ig-g-axis { margin-left: clamp(120px, 34%, 220px); }
.ig-gantt.in-detail .ig-g-row { grid-template-columns: clamp(120px, 34%, 220px) 1fr; }
.ig-g-row.cur .ig-g-name { color: var(--son); font-weight: 600; }
.ig-g-row.cur .ig-g-track { background-color: rgba(164, 59, 48, 0.08); }
.ig-g-row.cur .ig-g-bar { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--son); }
/* trang Dòng thời gian: khi đã mở chi tiết thì ẩn bảng dải dưới hàng để không lặp */
.ig-row.active .ig-detail:not([hidden]) ~ .ig-gantt { display: none; }
.ig-home .ig-detail .ig-gantt { display: block; }
@media (max-width: 899px) {
  .ig-d-media.two { grid-template-columns: 1fr; }
  .ig-d-media .ig-map { max-width: 460px; }
}
@media (max-width: 759px) {
  .ig-d-media .ig-gantt { margin-left: 0; }
  .ig-gantt.in-detail .ig-g-axis { margin-left: 0; }
  .ig-gantt.in-detail .ig-g-row { grid-template-columns: 1fr; }
}

/* ---------- bản đồ nhúng nối với dải song song ---------- */
.ig-map { position: relative; }
.ig-map-svg { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #eaf0f2; line-height: 0; }
.ig-map-svg svg, .ig-map-svg img { display: block; width: 100%; height: auto; }
.ig-map .map-zoom-btn { position: absolute; right: 8px; top: 8px; width: auto; padding: 0; background: none; border: 0; cursor: zoom-in; }
.ig-map .map-zoom-hint { position: static; display: inline-block; }
.ig-map-svg .rg, .ig-map-svg .lg { transition: opacity 220ms; }
.ig-map-svg .rg.dim { opacity: 0.18; }
.ig-map-svg .lg.dim { opacity: 0.35; }
.ig-map-svg .lg.lit text { font-weight: 700; }
.ig-g-row[data-entry] { cursor: pointer; border-radius: 3px; transition: background-color 160ms, opacity 200ms; }
.ig-g-row[data-entry]:hover, .ig-g-row[data-entry]:focus-visible { background: rgba(164, 59, 48, 0.07); outline: none; }
.ig-g-row.lit { background: rgba(164, 59, 48, 0.12); }
.ig-g-row.lit .ig-g-name { color: var(--son); font-weight: 600; }
.ig-g-row.dim { opacity: 0.42; }
.ig-g-sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.ig-g-sw[hidden] { display: none; }
.ig-g-flags { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.ig-g-flags img { height: 14px; width: auto; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.ig-gantt.in-detail .ig-g-row { min-height: 30px; }
.ig-gantt.in-detail .ig-g-name { padding: 3px 12px 3px 4px; }
.ig-d-side { display: grid; gap: 16px; align-content: start; }
.ig-d-flagset { padding: 12px 16px 14px; background: rgba(37, 60, 73, 0.05); }
.ig-d-flagset-h { font-size: 0.875rem; color: var(--cham); font-weight: 500; margin: 0 0 10px; }
.ig-d-flagset > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 14px; }
.ig-d-flagset button { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 6px; border: 1px solid transparent; border-radius: 4px; background: none; text-align: left; cursor: pointer; color: var(--ink); font: 400 0.75rem/1.35 var(--sans); }
.ig-d-flagset button:hover, .ig-d-flagset button:focus-visible { border-color: var(--line); background: var(--paper); }
.ig-d-flagset button.cur { border-color: rgba(164, 59, 48, 0.4); }
.ig-d-flagset img { width: 56px; height: auto; max-height: 40px; object-fit: contain; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.ig-d-flagset b { display: block; font: 400 0.8125rem/1.3 var(--serif); }
.ig-d-media .ig-gantt.in-detail { margin: 0; }

/* hộp thông tin khi bấm vào một vùng trên bản đồ */
.ig-map-svg { position: relative; }
.map-tip { position: absolute; z-index: 6; max-width: 280px; padding: 8px 11px; background: #fffdf8; border: 1px solid var(--line); border-left: 3px solid var(--son);
  border-radius: 4px; box-shadow: 0 6px 18px rgba(36, 34, 31, 0.18); font: 13px/1.45 var(--sans); color: var(--ink); line-height: 1.45; pointer-events: none; }
.map-tip b { display: block; font-size: 14px; margin-bottom: 2px; }
.map-tip span { display: block; color: #5a554c; }
.mz-svg { position: absolute; left: 0; top: 0; transform-origin: 0 0; line-height: 0; }
.mz-svg svg { display: block; }
.mz-svg .rg { cursor: pointer; transition: opacity 160ms; }
.mz-svg .rg.lit { filter: brightness(1.08); }

/* bản đồ trong trang: lăn chuột để phóng to, kéo để di chuyển */
.ig-map-svg svg { touch-action: pan-y; }
.ig-map-svg.zoomed svg { cursor: grab; touch-action: none; }
.ig-map-svg.zoomed svg:active { cursor: grabbing; }

/* ===== bản đồ nền địa hình (Leaflet) ===== */
.lf-box { position: relative; }
.lf-map { height: 440px; background: #cfe0e8; }
@media (max-width: 599px) { .lf-map { height: 340px; } }
.lf-head { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 8px 2px 4px; }
.lf-head b { font-family: var(--serif); font-size: 1.05rem; }
.lf-head span { color: #5a554c; font-size: 0.85rem; }
.lf-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.lf-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: 500 0.82rem/1.4 var(--sans); cursor: pointer; color: var(--ink); }
.lf-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lf-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 4px 2px 0; font-size: 0.82rem; }
.lf-lg-i { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.lf-lg-i i { width: 14px; height: 11px; border-radius: 2px; border: 1px solid rgba(36,34,31,.5); flex: none; }
.lf-lg-i .lf-line { border: 0; border-top: 2px dashed #24221f; height: 0; }
.lf-lg-i.dim { opacity: .4; } .lf-lg-i.lit { font-weight: 700; }
.lf-caps { margin: 6px 0 0; font-size: 0.8rem; width: 100%; }
.lf-caps span { display: inline-block; margin-right: 12px; }
.lf-no { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #24221f; color: #FFD25A; font-size: 10px; }
.lf-note { margin: 4px 0 0; font-size: 0.74rem; color: #5a554c; width: 100%; }
.lf-lab { pointer-events: none; }
.lf-lab span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; color: #1d1b18; paint-order: stroke; -webkit-text-stroke: 0; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.lf-l span { font: 700 13px/1 var(--sans); }
.lf-c span { font: 600 11px/1 var(--sans); }
.lf-f span { font: italic 500 10.5px/1 var(--sans); color: #4a453d; }
.lf-i span { font: 600 11px/1 var(--sans); }
.lf-s span { font: 500 11px/1 var(--sans); }
.lf-left span { transform: translate(0, -50%); }
.lf-n span { font: italic 500 12px/1 var(--sans); color: #5a554c; letter-spacing: .5px; }
.lf-cap { position: relative; }
.lf-cap span { position: absolute; left: 0; top: 0; font-size: 15px; line-height: 15px; color: #FFD25A; text-shadow: 0 0 1px #24221f, 0 0 1px #24221f, 0 0 2px #24221f; }
.lf-cap b { position: absolute; left: 14px; top: 0; width: 15px; height: 15px; border-radius: 50%; background: #24221f; color: #FFD25A; font: 700 9.5px/15px var(--sans); text-align: center; }
.lf-pop .leaflet-popup-content { margin: 9px 12px; font: 13px/1.45 var(--sans); }
.lf-pop .leaflet-popup-content b { display: block; font-size: 14px; margin-bottom: 2px; }
.lf-pop .leaflet-popup-content span { display: block; color: #5a554c; }
.ig-map.lf-fs { position: fixed; inset: 0; z-index: 1000; margin: 0; background: var(--paper); padding: 12px 16px; overflow: auto; }
.ig-map.lf-fs .lf-map { height: calc(100vh - 190px); }
html.lf-lock { overflow: hidden; }
.lf-full { position: absolute; top: 8px; right: 8px; z-index: 500; }
/* không để quy tắc ảnh / SVG chung làm méo ô nền và lớp vùng của Leaflet */
.ig-map-svg .lf-map img, .ig-map-svg .lf-map svg { display: inline; width: auto; height: auto; max-width: none; max-height: none; }
.ig-map-svg .lf-map .leaflet-tile { width: 256px; height: 256px; }

/* ---------- bản đồ kiểu video tư liệu: biển xanh xám, đất xanh lá nhạt, vùng màu đặc, viền đen, chữ viết tay ---------- */
.lf-tools { position: absolute; top: 8px; right: 8px; z-index: 500; display: flex; gap: 6px; align-items: center; }
.lf-tools .lf-full { position: static; }
.lf-style { border: 1px solid rgba(36,34,31,.35); background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 11px; font: 500 0.78rem/1.4 var(--sans); color: var(--ink); cursor: pointer; }
.lf-style:hover { background: #fff; }
.ig-map.lf-vd .lf-map { background-color: #93a7ae;
  background-image: radial-gradient(ellipse at 20% 30%, rgba(255,255,255,.10), transparent 55%), radial-gradient(ellipse at 80% 75%, rgba(60,70,90,.10), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.2 0 0 0 0 0.2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.ig-map.lf-vd .leaflet-overlay-pane svg { filter: drop-shadow(0 0 0 transparent); }
.ig-map.lf-vd .lf-lab span { font-family: "Patrick Hand SC", "Be Vietnam Pro", sans-serif; text-shadow: none; color: #1f1d1a; letter-spacing: .3px; }
.ig-map.lf-vd .lf-l span { font-size: 17px; font-weight: 400; }
.ig-map.lf-vd .lf-c span { font-size: 13px; font-weight: 400; }
.ig-map.lf-vd .lf-i span { font-size: 12px; font-weight: 400; }
.ig-map.lf-vd .lf-s span { font-size: 13px; }
.ig-map.lf-vd .lf-n span, .ig-map.lf-vd .lf-f span { font-size: 13px; font-style: normal; color: #3b382f; }
.lf-gate { position: relative; }
.lf-gate svg { position: absolute; left: 0; top: 0; filter: drop-shadow(0 0 1px rgba(255,255,255,.6)); }
.lf-gate b { position: absolute; left: 25px; top: -2px; width: 14px; height: 14px; border-radius: 50%; background: #1f1d1a; color: #f2e6b8; font: 700 9px/14px var(--sans); text-align: center; }
.lf-isle { color: #c8746a; font-size: 14px; line-height: 14px; text-align: center; text-shadow: 0 0 1px #1f1d1a, 0 0 1px #1f1d1a; }
.lf-year { position: absolute; right: 14px; bottom: 22px; z-index: 450; pointer-events: none; font: 400 clamp(26px, 4vw, 44px)/1 "Patrick Hand SC", var(--serif); color: #1f1d1a; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.ig-map:not(.lf-vd) .lf-year { color: #24221f; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.ig-map.lf-vd .leaflet-container { font-family: var(--sans); }

/* ---------- chuỗi lãnh thổ ---------- */
.ig-rb-terr { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; display: grid; padding: inherit; }
.terr { margin: 56px 0 24px; }
.terr-head h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 500; margin: 0 0 6px; }
.terr-head p { margin: 0 0 18px; color: rgba(36,34,31,.75); max-width: 60ch; }
.terr-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.terr-map { position: sticky; top: 72px; }
.terr-map .ig-map { max-width: none; margin: 0; }
.terr-map .lf-map { height: min(68vh, 620px); }
.terr-list { list-style: none; margin: 0; padding: 0 0 40vh; counter-reset: none; }
.terr-step { position: relative; padding: 14px 16px 16px 22px; margin: 0 0 10px; border-left: 2px solid var(--line); cursor: pointer; transition: background 200ms, border-color 200ms; border-radius: 0 6px 6px 0; }
.terr-step::before { content: ""; position: absolute; left: -7px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--son); }
.terr-step.on { background: rgba(164,59,48,.07); border-left-color: var(--son); }
.terr-step.on::before { background: var(--son); }
.terr-step:focus-visible { outline: 2px solid var(--son); outline-offset: 2px; }
.terr-yr { display: block; font: 400 1.25rem/1.1 "Patrick Hand SC", var(--serif); color: var(--son); }
.terr-step h3 { margin: 2px 0 6px; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.terr-step p { margin: 0; font-size: 0.93rem; line-height: 1.6; color: rgba(36,34,31,.88); }
.terr-go { display: inline-block; margin-top: 8px; font-size: 0.82rem; color: var(--son); }
/* nội dung mốc đang xem nằm dưới bản đồ; danh sách bên phải chỉ còn năm + tên */
.terr-card { margin-top: 14px; padding: 14px 18px 16px; border-left: 3px solid var(--son); background: rgba(164,59,48,.06); border-radius: 0 8px 8px 0; }
.terr-card:empty { display: none; }
.terr-card .terr-yr { font-size: 1.35rem; }
.terr-card h3 { margin: 2px 0 6px; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.terr-card p { margin: 0; font-size: 0.98rem; line-height: 1.65; color: rgba(36,34,31,.9); max-width: 70ch; }
@media (min-width: 900px) {
  .terr-step { padding: 8px 14px 9px 22px; margin: 0 0 4px; }
  .terr-step::before { top: 13px; }
  .terr-step p, .terr-step .terr-go { display: none; }
  .terr-step .terr-yr { display: inline; font-size: 1.05rem; margin-right: 8px; }
  .terr-step h3 { display: inline; font-size: 1rem; margin: 0; }
  .terr-list { padding-bottom: 50vh; }
}
@media (max-width: 899px) {
  .terr-grid { grid-template-columns: 1fr; gap: 12px; }
  .terr-map { top: 0; z-index: 20; background: var(--paper); padding-top: 6px; }
  .terr-map .lf-map { height: 44vh; }
  .terr-map .lf-legend, .terr-map .lf-head span { display: none; }
  .terr-list { padding-bottom: 30vh; }
  .terr-card { display: none; }
}
@media (prefers-reduced-motion: reduce) { .terr-step { transition: none; } }
/* khung bản đồ theo tỉ lệ khung hình video 16:9 */
.lf-map { height: auto !important; aspect-ratio: 16 / 9; background: var(--paper) !important; }
.ig-map.lf-vd .lf-map .leaflet-overlay-pane { filter: none; }
.ig-map.lf-fs .lf-map { aspect-ratio: auto; height: calc(100vh - 200px) !important; }
.ig-map.lf-fs { max-width: none; }
.ig-map-svg.lf-box { background: var(--paper); }
.ig-map.lf-vd .lf-map { background-color: #93a7ae !important; }
.ig-map.lf-vd .lf-n span, .ig-map.lf-vd .lf-f span { opacity: .7; }

/* ---------- bản đồ vẽ lại y như khung hình video ---------- */
.lf-map .vk-l { position: absolute; inset: 0; transition: opacity 800ms ease; overflow: hidden; background: #93a7ae; }
.ig-map-svg .lf-map .vk-l svg { display: block; width: 100%; height: 100%; max-width: none; }
.lf-map:has(.vk-l) { position: relative; }
.vk text { font-family: "Patrick Hand SC", "Be Vietnam Pro", sans-serif; fill: #1f1d1a; text-anchor: middle; pointer-events: none; }
.vk .tn { letter-spacing: 1px; }
.vk .nbt { opacity: .62; }
.vk .cn { font-size: 21px; paint-order: stroke; stroke: rgba(246,242,233,.88); stroke-width: 5px; stroke-linejoin: round; }
.vk .tn { paint-order: stroke; stroke: rgba(246,242,233,.55); stroke-width: 4px; stroke-linejoin: round; }
.lf-zoom { display: inline-flex; gap: 2px; }
.lf-zoom button { width: 30px; min-height: 30px; padding: 0; border-radius: 999px; border: 0; background: rgba(255,255,255,.92); color: #1f1d1a; font: 600 1rem/1 var(--sans); cursor: pointer; }
.lf-zoom button:hover { background: #1f1d1a; color: #fff; }
.lf-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(31,29,26,.82); color: #fff; font: 500 .8rem/1 var(--sans); padding: 8px 12px; border-radius: 999px; pointer-events: none; opacity: 0; transition: opacity 200ms; z-index: 5; }
.lf-hint.on { opacity: 1; }
.vk .rg { cursor: pointer; transition: opacity 250ms, filter 250ms; }
.vk .rg:hover { filter: brightness(1.06); }
.vk .rg.dim { opacity: .35; }
.vk .rg.lit { stroke-width: 4; }
.vk .cap { cursor: pointer; }
.vk-l.zoomed svg { cursor: grab; }
@media (prefers-reduced-motion: reduce) { .lf-map .vk-l { transition: none; } }
.terr-ctl { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.terr-ctl button { border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 0.85rem/1 var(--sans); cursor: pointer; min-height: 36px; }
.terr-ctl button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.terr-ctl button:disabled { opacity: .35; cursor: default; }
.terr-ctl .terr-next { background: var(--son); border-color: var(--son); color: #fff; }
.terr-mid { flex: 1 1 200px; display: grid; gap: 4px; min-width: 0; }
.terr-now { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terr-now b { font: 400 1.05rem/1 "Patrick Hand SC", var(--serif); color: var(--son); margin-right: 4px; }
.terr-now small { color: rgba(36,34,31,.55); margin-left: 4px; }
.terr-rng { width: 100%; accent-color: var(--son); }
.vk-l::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.27 0 0 0 0 0.22 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(60, 50, 40, .18)); }
/* ô "Lãnh thổ" cuối dải chương: cùng kiểu các ô chương */
.ig-ribbon { grid-template-columns: repeat(8, minmax(0, 1fr)) minmax(0, 0.9fr); }
.ig-ribbon .ig-rb-terr { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px 12px; color: var(--paper); background: var(--son); border: 0; text-align: left; cursor: pointer; font: inherit; }
.ig-ribbon .ig-rb-terr .roman { color: var(--paper); }
.ig-ribbon .ig-rb-terr:hover { background: #8e3228; }
.ig-maps button { width: 84px; }
.ig-maps img { height: 47px; object-fit: cover; object-position: center; }
.ig-map.lf-fs .lf-map:has(.vk-l) { aspect-ratio: 16 / 9; height: auto !important; width: min(100%, calc((100vh - 210px) * 16 / 9)); margin: 0 auto; }
.ig-map.lf-fs .lf-box { background: transparent; border: 0; }
.lf-map .vk-l { background: var(--paper); }

/* chip bản đồ trên cột mốc + bảng nổi xem bản đồ */
.ig-stop { position: relative; }
.ig-mchip, .ig-mchip-sp { display: none; }
.ig-track.has-maps .ig-mchip-sp { display: block; height: 54px; }
.ig-track.has-maps .ig-mchip { display: flex; flex-direction: column; align-items: center; gap: 3px; height: 54px; margin: 0 auto; padding: 0; border: 0; background: none; cursor: pointer; font: 500 0.75rem/1 var(--sans); color: var(--ink); }
.ig-mchip img { width: 66px; height: 37px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(36,34,31,.25); background: #93a7ae; transition: transform 200ms var(--ease), border-color 200ms; }
.ig-mchip span { display: inline-flex; gap: 3px; align-items: center; }
.ig-mchip i { font-style: normal; color: var(--son); font-weight: 600; }
.ig-mchip:hover img, .ig-mchip:focus-visible img { transform: translateY(-2px); border-color: var(--son); }
.ig-mchip:focus-visible { outline: 2px solid var(--son); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 759px) {
  .ig-track.has-maps .ig-mchip-sp { display: none; }
  .ig-track.has-maps .ig-mchip { position: absolute; right: 0; top: 10px; z-index: 2; height: auto; }
  .ig-mchip img { width: 54px; height: 30px; }
  .ig-stop.has-map > button:not(.ig-mchip) { padding-right: 62px; }
}
.mp-pop { position: fixed; inset: 0; z-index: 3000; background: rgba(28,26,23,.55); display: grid; place-items: center; padding: 16px; }
.mp-pop[hidden] { display: none; }
.mp-dlg { width: min(1100px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border-radius: 10px; padding: 16px 20px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: mpIn 220ms var(--ease); }
@keyframes mpIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.mp-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 10px; }
.mp-k { margin: 0; font-size: 0.78rem; color: var(--son); }
.mp-head h2 { margin: 2px 0; font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 600; }
.mp-sub { margin: 0; font-size: 0.88rem; color: rgba(36,34,31,.7); }
.mp-x { flex: none; border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 0.85rem/1 var(--sans); cursor: pointer; min-height: 36px; }
.mp-x:hover { background: var(--ink); color: var(--paper); }
.mp-body .ig-map { max-width: none; margin: 0; }
.mp-body .ig-map:not(.lf-fs) .ig-map-svg { width: min(100%, calc((100vh - 300px) * 16 / 9)); margin: 0 auto; }
.mp-ctl { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.mp-ctl > button { border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 16px; font: 600 0.85rem/1 var(--sans); cursor: pointer; min-height: 38px; }
.mp-ctl > button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.mp-ctl > button:disabled { opacity: .35; cursor: default; }
.mp-ctl .mp-next { background: var(--son); border-color: var(--son); color: #fff; }
.mp-sib { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.mp-sib button { display: grid; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; font: 500 0.72rem/1.1 var(--sans); color: var(--ink); }
.mp-sib button[aria-pressed="true"] { border-color: var(--son); box-shadow: 0 0 0 2px rgba(164,59,48,.25); }
.mp-sib img { width: 58px; height: 33px; object-fit: cover; border-radius: 2px; }
.mp-n { font-size: 0.82rem; color: rgba(36,34,31,.6); }
.mp-go { display: inline-block; margin-top: 10px; font-size: 0.88rem; color: var(--son); }
.mp-go[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .mp-dlg { animation: none; } .ig-mchip img { transition: none; } }
.ig-map:not(.lf-vd) .lf-zoom { display: none; }

/* diễn biến ngắn dưới tên bản đồ: hình thành → giao tranh → kết thúc */
.lf-story { list-style: none; margin: 6px 0 2px; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: st; }
.lf-story li { position: relative; padding: 8px 10px 8px 12px; background: rgba(255,255,255,.55); border-left: 3px solid var(--son); border-radius: 0 6px 6px 0; font-size: 0.84rem; line-height: 1.45; color: #3a3631; }
.lf-story li + li::before { content: "→"; position: absolute; left: -11px; top: 8px; color: var(--son); font-weight: 700; font-size: 0.8rem; background: var(--paper); line-height: 1; }
.lf-story b { display: block; font-family: var(--sans); font-size: 0.72rem; font-weight: 700; color: var(--son); margin-bottom: 2px; }
.lf-story li:nth-child(2) { border-left-color: #8a6a2a; } .lf-story li:nth-child(2) b { color: #8a6a2a; }
.lf-story li:nth-child(3) { border-left-color: #24221f; } .lf-story li:nth-child(3) b { color: #24221f; }
.terr-map .lf-story { display: none; }
@media (max-width: 759px) { .lf-story { grid-template-columns: 1fr; gap: 6px; } .lf-story li + li::before { display: none; } }

/* nút mở dải "các giai đoạn cùng thời" dưới tên chương */
.ig-gbtn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; min-height: 34px; border: 1px solid var(--cham); border-radius: 999px; background: var(--cham); color: var(--paper); font: 500 0.8125rem/1 var(--sans); cursor: pointer; }
.ig-gbtn::after { content: "▾"; transition: transform 200ms; }
.ig-gbtn[aria-expanded="true"]::after { transform: rotate(180deg); }
.ig-flag > a + .ig-gbtn { margin-left: 0; }
.ig-flag .ig-gbtn { display: flex; width: fit-content; }
.ig-home .ig-row.show-gantt > .ig-gantt { display: block; }
.ig-gantt summary small { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
@media (prefers-reduced-motion: reduce) { .ig-gbtn::after { transition: none; } }
.ig-flag > .ig-gbtn { grid-column: 2; justify-self: start; }
.ig-gbtn:hover { background: var(--son); border-color: var(--son); }
.ig-d-media.two .lf-story { grid-template-columns: 1fr; gap: 6px; } .ig-d-media.two .lf-story li + li::before { display: none; }

/* thẻ lãnh thổ: mở rộng xem chi tiết mốc */
.terr-more { margin-top: 10px; }
.terr-more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font: 600 0.875rem/1 var(--sans); color: var(--son); padding: 8px 14px; border: 1px solid var(--son); border-radius: 999px; }
.terr-more > summary::-webkit-details-marker { display: none; }
.terr-more > summary::after { content: "▾"; transition: transform 200ms; }
.terr-more[open] > summary::after { transform: rotate(180deg); }
.terr-more > summary:hover { background: var(--son); color: #fff; }
.terr-card .terr-more .lf-story { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 12px; }
.terr-card .terr-more .lf-story li + li::before { display: none; }
.terr-entry { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(36,34,31,.12); }
.terr-entry h4 { margin: 0 0 4px; font: 600 1rem/1.3 var(--serif); }
.terr-entry h4 small { font: 400 0.8rem var(--sans); color: rgba(36,34,31,.6); }
.terr-card .terr-entry p { font-size: 0.9rem; }
.terr-gs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.terr-gs a { display: grid; gap: 4px; text-decoration: none; color: var(--ink); font-size: 0.74rem; line-height: 1.25; }
.terr-gs img { width: 100%; aspect-ratio: 5 / 8; object-fit: contain; background: #fff; border-top: 3px solid var(--tint); }
.terr-gs a:hover span { color: var(--son); }
.terr-card .terr-more .terr-go { display: inline-block; margin-top: 12px; }
.ig-d-sum { font-size: 1rem; line-height: 1.65; max-width: 75ch; }
@media (prefers-reduced-motion: reduce) { .terr-more > summary::after { transition: none; } }
@media (min-width: 900px) { .terr-map { max-height: calc(100vh - 84px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; } }
