/* โปรแกรมทัวร์ฉบับพิมพ์ / PDF (A4) */
/* ขอบกระดาษทำในเนื้อหาเอง (ไม่พึ่ง @page margin) → ได้ขอบเท่ากันทุกหน้า แม้ผู้ใช้ตั้ง Margins = None ในหน้าต่างพิมพ์
   ขอบซ้าย-ขวา = padding ของ .sheet · ขอบบน-ล่าง = แถวหัว/ท้ายของตาราง .pg ซึ่งเบราว์เซอร์พิมพ์ซ้ำทุกหน้า */
@page { size: A4; margin: 0; }
.pg { width: 100%; border-collapse: collapse; border-spacing: 0; }
.pg td { padding: 0; }
.pg-sp { height: 0; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "IBM Plex Sans Thai", "Sarabun", sans-serif; color: #1c1917; font-size: 10.5pt; line-height: 1.6; background: #e7e5e4; }
.toolbar { position: sticky; top: 0; z-index: 5; background: #1c1917; color: #fff; padding: 10px 18px; display: flex; gap: 16px; align-items: center; font-size: 14px; }
.toolbar a { color: #fff; }
.toolbar button { background: #c2410c; color: #fff; border: 0; border-radius: 999px; padding: 8px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.toolbar span { opacity: .6; }
.sheet { background: #fff; max-width: 210mm; margin: 18px auto; padding: 14mm; box-shadow: 0 6px 30px rgba(0,0,0,.15); }
.doc-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #1c1917; padding-bottom: 8px; margin-bottom: 12px; }
.brand { font-weight: 700; font-size: 16pt; }
.logo { height: 26px; width: auto; display: block; }
.logo.invert { filter: invert(1) brightness(.2); }
.doc-meta { font-size: 8pt; text-align: right; color: #57534e; line-height: 1.4; }
.cover img { width: 100%; height: 72mm; object-fit: cover; border-radius: 4px; display: block; }
h1 { font-size: 22pt; margin: 12px 0 0; line-height: 1.2; }
.kind { color: #57534e; margin: 2px 0 10px; }
h2 { font-size: 13pt; margin: 18px 0 6px; padding-bottom: 3px; border-bottom: 1px solid #d6d3d1; color: #c2410c; break-after: avoid; }
h3 { font-size: 11pt; margin: 12px 0 4px; break-after: avoid; }
p { margin: 0 0 6px; }
ul, ol { margin: 0 0 6px; padding-left: 1.3em; }
a { color: #c2410c; text-decoration: none; }
table.facts { width: 100%; border-collapse: collapse; margin: 6px 0; }
table.facts th { text-align: left; width: 34mm; vertical-align: top; padding: 4px 8px 4px 0; font-weight: 600; border-bottom: 1px solid #e7e5e4; }
table.facts td { padding: 4px 0; border-bottom: 1px solid #e7e5e4; }
.rich blockquote { margin: 6px 0; padding: 6px 10px; background: #faf9f7; border-left: 2px solid #c2410c; color: #57534e; font-size: 9.5pt; }
.rich blockquote p:last-child { margin: 0; }
.hl { list-style: "✓  "; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; }
.two ul.yes { list-style: "✓  "; }
.two ul.no { list-style: "✕  "; }
.day { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dotted #d6d3d1; }
.day h3 span { color: #c2410c; margin-right: 6px; }
.meals { font-size: 9pt; color: #57534e; }
.thumbs { break-inside: avoid; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 5px; }
.thumbs img { width: 100%; height: 27mm; object-fit: cover; border-radius: 3px; display: block; }
.pics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 8px 0 4px; break-inside: avoid; }
.pics img { width: 100%; height: 30mm; object-fit: cover; border-radius: 3px; display: block; }
.doc-foot { margin-top: 16px; padding-top: 8px; border-top: 2px solid #1c1917; font-size: 9.5pt; }
.doc-foot span { font-size: 8pt; color: #78716c; }
@media print {
  body { background: #fff; }
  .noprint { display: none !important; }
  .sheet { box-shadow: none; margin: 0; padding: 0 14mm; max-width: none; }
  .pg-sp { height: 13mm; }
  p, li, blockquote { orphans: 2; widows: 2; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* เที่ยวบิน (สร้างจากรายการ) + เที่ยวบินของแต่ละวัน */
.flights p { margin: 3px 0; }
.flights .fl-note { font-size: 9pt; color: #57534e; }
.flights .fl-g { break-inside: avoid; margin: 5px 0 7px; padding: 5px 10px; border: 1px solid #e7e5e4; border-radius: 4px; background: #faf9f7; }
.flights .fl-head { font-weight: 600; color: #c2410c; font-size: 9.5pt; }
.flights .fl-g.c-blue { background: #eff6ff; border-color: #bfdbfe; } .flights .fl-g.c-blue .fl-head { color: #1d4ed8; }
.flights .fl-g.c-green { background: #f0fdf4; border-color: #bbf7d0; } .flights .fl-g.c-green .fl-head { color: #15803d; }
.flights .fl-route { font-weight: 600; }
.flights ul { list-style: none; margin: 2px 0 0; padding: 0; }
.flights .fl-warn { margin-top: 6px; padding: 4px 10px; border-left: 2px solid #c2410c; background: #fff7ed; }
.fact { margin: 4pt 0; padding-left: 6pt; border-left: 2pt solid #fbbf24; font-size: 9pt; color: #57534e; }
.fact b { color: #92400e; }
.day-fl { margin: 2px 0 4px; font-size: 9.5pt; color: #1e3a8a; }
.stay { margin: 4pt 0; padding: 3pt 6pt; border-left: 2pt solid #0f766e; background: #f0f7f4; font-size: 9.5pt; }
.stay b { color: #0f766e; margin-right: 4pt; }
