/* หน้าวีดีโอแนะนำหน่วยงาน (about/video.html) ทุกกฎอยู่ใต้ .vp หรือ .sheet:has(.vp) ไม่กระทบหน้าอื่น
   เรียบ แบน ไม่มีเงา ไม่มีไล่สี  v2: จำกัดความกว้าง 1200px จัดกลาง ตัวเล่นสูงไม่เกินจอ ขนาดตัวอักษรและระยะยืดตามจอ */

/* ความกว้างเนื้อหา: ไม่เกิน 1200px จัดกลางในพื้นที่ข้างเมนู */
.sheet:has(.vp) > :is(.crumb, h1, .vp, .siblings) { max-width: 1200px; margin-left: auto; margin-right: auto; }
.sheet:has(.vp) > h1 { line-height: 1.45; font-size: clamp(26px, 1.2rem + 1vw, 36px); }

.vp {
  --soft: #f4ecf5;
  --sp: clamp(20px, 1rem + 1.6vw, 40px);
  container-type: inline-size;
  line-height: 1.6;
}
.vp .vp-sub { color: var(--mute); font-size: clamp(15px, .85rem + .35vw, 19px); margin: 0 0 clamp(14px, 2vw, 24px); }

/* เครื่องเล่น ฝัง YouTube เมื่อกดเท่านั้น คง 16:9 สูงไม่เกินที่เหลือในจอแรก */
.vp .player { position: relative; aspect-ratio: 16 / 9; background: #111; border-radius: 12px; overflow: hidden; }
.vp .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vp .player > .poster { all: unset; position: absolute; inset: 0; cursor: pointer; }
.vp .player > .poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp .player > .poster:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.vp .play { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; }
.vp .play::before { content: ""; margin-left: 7px; border-left: 28px solid #fff; border-top: 17px solid transparent; border-bottom: 17px solid transparent; }
.vp .poster:hover .play { background: var(--brand-dark); }
.vp .dur { position: absolute; right: 12px; bottom: 12px; padding: 2px 10px; border-radius: 4px; background: #111; color: #fff; font-size: 14px; line-height: 1.6; }
.vp .main-player, .vp .vp-bar {
  /* กว้างสุดเท่าที่ความสูงยังพอดีจอ (หักส่วนหัวราว 17rem) แต่ไม่ต่ำกว่า 30rem และไม่เกิน 72% ของความสูงจอ */
  max-width: min(100%, max(30rem, min(calc(72vh * 16 / 9), calc((100vh - 17rem) * 16 / 9))));
  margin-left: auto; margin-right: auto;
}
.vp .main-player { border-radius: 12px 12px 0 0; }
.vp .vp-bar { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 18px; background: #fff; border-radius: 0 0 12px 12px; }
.vp .vp-bar b { display: block; font-size: clamp(16px, .9rem + .3vw, 19px); }
.vp .vp-bar span { color: var(--mute); font-size: 14px; }
.vp .vp-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.vp .vp-acts .btn { flex: 1; justify-content: center; }

/* ปุ่ม */
.vp .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.6; }
.vp .btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.vp .btn.ghost { background: #fff; color: var(--brand-dark); }
.vp .btn.ghost:hover { background: var(--soft); }
.vp .ts { all: unset; box-sizing: border-box; cursor: pointer; }
.vp .ts:focus-visible, .vp .btn:focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 3px; border-radius: 8px; }
.vp .time { display: inline-block; min-width: 3.2em; padding: 0 8px; border-radius: 4px; background: var(--soft); color: var(--brand-dark); font-weight: 700; font-size: 13px; line-height: 1.7; text-align: center; font-variant-numeric: tabular-nums; }

/* รู้จักเราใน ๔ ตอน */
.vp .story-h { display: flex; flex-direction: column; gap: 0; margin-top: calc(var(--sp) * 1.2); padding-bottom: 10px; border-bottom: 2px solid var(--brand); }
.vp .story-h .k { margin: 0; font-size: clamp(20px, 1rem + .7vw, 28px); font-weight: 700; color: var(--brand-dark); line-height: 1.45; }
.vp .story-h .s { margin: 0; color: var(--mute); font-size: 14px; }
.vp .row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: var(--sp) 0; border-bottom: 1px solid var(--line); }
.vp .row:last-of-type { border-bottom: 0; }
.vp .num { font-size: clamp(22px, 1rem + 1.4vw, 40px); font-weight: 700; color: var(--brand); line-height: 1.2; }
.vp .row h2 { margin: 0 0 8px; font-size: clamp(19px, .95rem + .5vw, 24px); line-height: 1.5; }
.vp .row p { max-width: 62ch; }
.vp .seek { color: var(--brand-dark); font-weight: 700; margin-top: 6px; }
.vp .seek:hover .time { background: var(--brand); color: #fff; }
.vp .cap { color: var(--mute); font-size: 14px; }
.vp .miss, .vp .strip { list-style: none; padding: 0; margin: 10px 0 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.vp .miss .ts { display: block; width: 100%; height: 100%; background: #fff; border-radius: 10px; overflow: hidden; }
.vp .miss img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.vp .miss b { display: block; padding: 10px 12px 2px; font-size: clamp(15px, .85rem + .2vw, 17px); line-height: 1.5; }
.vp .miss .time { margin: 0 12px 12px; }
.vp .miss .ts:hover b { color: var(--brand-dark); }
.vp .strip img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 8px; }
.vp .strip.three li:first-child { grid-column: 1 / -1; }

/* คำคมปิดท้าย */
.vp .lead-in { margin: calc(var(--sp) * .8) 0 0; text-align: center; }
.vp .q { margin: 0 auto; max-width: 44em; padding: 0; }
.vp .qm { display: block; height: 24px; font-size: 44px; line-height: 1; color: var(--brand); font-weight: 700; }
.vp .q p { margin: 0 0 2px; font-size: clamp(17px, .9rem + .5vw, 23px); font-weight: 400; line-height: 1.6; color: var(--brand-dark); }
.vp .q cite { font-style: normal; font-size: 13px; color: var(--mute); }
.vp .cue { margin: 18px 0 0; font-size: 14px; font-weight: 700; color: var(--brand-dark); }

/* การ์ดเชิญชวนเข้าชม */
.vp .visit { display: grid; grid-template-columns: 1fr; margin-top: 12px; border-radius: 12px; overflow: hidden; background: #fff; }
.vp .visit .v-l { padding: clamp(20px, 2.4vw, 36px); }
.vp .visit h2 { margin: 0 0 6px; font-size: clamp(20px, 1rem + .6vw, 26px); line-height: 1.5; }
.vp .visit dl { display: grid; grid-template-columns: 1fr; gap: 0; margin: 14px 0 20px; }
.vp .visit dt { color: var(--mute); font-size: 14px; }
.vp .visit dd { margin: 0 0 8px; font-weight: 700; }
.vp .visit .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.vp .visit .v-r { position: relative; min-height: 180px; order: -1; aspect-ratio: 16 / 9; }
.vp .visit .v-r img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vp .extra { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center; margin-top: clamp(16px, 2vw, 28px); padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.vp .extra .player { border-radius: 8px; }
.vp .extra .play { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.vp .extra .play::before { border-left-width: 15px; border-top-width: 9px; border-bottom-width: 9px; margin-left: 4px; }
.vp .extra .dur { right: 6px; bottom: 6px; font-size: 12px; padding: 0 6px; }
.vp .extra p { margin: 0; }
.vp .extra .k { color: var(--mute); font-size: 13px; }
.vp .extra b { font-size: 15px; }

/* ปรับตามความกว้างของเนื้อหาจริง (ไม่ใช่ความกว้างจอ เพราะเมนูกินที่ด้านซ้าย 380px) */
@container (max-width: 479px) {
  .vp .play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .vp .play::before { border-left-width: 21px; border-top-width: 12px; border-bottom-width: 12px; margin-left: 6px; }
}
@container (min-width: 560px) {
  .vp .vp-bar { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; }
  .vp .vp-acts .btn { flex: none; }
  .vp .story-h { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
  .vp .strip.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vp .strip.three li:first-child { grid-column: auto; }
  .vp .extra { grid-template-columns: 220px 1fr; gap: 18px; padding: 14px; }
  .vp .extra b { font-size: 17px; }
}
@container (min-width: 680px) {
  .vp .row { grid-template-columns: clamp(56px, 6cqi, 80px) 1fr; gap: 18px; }
  .vp .visit { grid-template-columns: 1.2fr 1fr; }
  .vp .visit .v-r { order: 0; aspect-ratio: auto; min-height: 260px; }
  .vp .visit dl { grid-template-columns: auto 1fr; gap: 6px 18px; }
  .vp .visit dd { margin: 0; }
}
@container (min-width: 700px) {
  .vp .miss, .vp .strip:not(.three) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container (min-width: 1000px) {
  .vp .qm { font-size: 56px; height: 30px; }
}
