/* match.css — หน้า "จับคู่อาชีพกับรายวิชา" ใช้ร่วมกับ style.css + link.css (โทเคนสีและคลาส cv-* ชุดเดียวกัน) */
.mt-field-label { display: block; margin: 16px 0 8px; font-weight: 700; font-size: .95rem; color: var(--text); }
.mt-hint { margin: 8px 0 0; font-size: .86rem; line-height: 1.55; color: var(--text-secondary); }
.mt-hint b { color: var(--text); }

/* ขั้น 1 */
.mt-level { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 720px; }
.mt-level button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 18px; background: #fff; border: 2px solid var(--border); border-radius: var(--radius-sm); font: inherit; text-align: left; color: var(--text); cursor: pointer; transition: var(--transition); }
.mt-level button:hover { border-color: var(--primary-light); }
.mt-level button b { font-size: 1.25rem; font-weight: 800; color: var(--primary-dark); }
.mt-level button span { font-size: .88rem; }
.mt-level button small { font-size: .8rem; color: var(--text-secondary); min-height: 1.2em; }
.mt-level button[aria-checked="true"] { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px var(--primary-100); }
.mt-level button:focus-visible, .mt-combo-toggle:focus-visible, .mt-occ:focus-visible, .mt-course:focus-visible, .mt-tab:focus-visible, .mt-pill:focus-visible, .mt-more:focus-visible, .mt-chip:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }

/* รายการสาขายาวเลยกล่องได้ ต้องอยู่เหนือ footer ที่มาทีหลังใน DOM และมี z-index เท่ากับ .link-step */
#page1 { z-index: 30; }
.mt-combo { position: relative; max-width: 720px; }
.mt-combo .search-box { position: relative; }
.mt-combo input:disabled { background: var(--bg); cursor: not-allowed; }
.mt-combo-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 8px; color: var(--text-secondary); cursor: pointer; }
.mt-combo-toggle:hover:not(:disabled) { background: var(--primary-50); color: var(--primary); }
.mt-combo-toggle:disabled { opacity: .4; cursor: not-allowed; }
.mt-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 4px 0; }
.mt-list[hidden] { display: none; }
.mt-list-group { position: sticky; top: -4px; padding: 8px 14px 4px; background: #fff; font-size: .78rem; font-weight: 700; color: var(--text-secondary); }
.mt-opt { display: flex; align-items: baseline; gap: 10px; min-height: 40px; padding: 8px 14px; cursor: pointer; }
.mt-opt:hover, .mt-opt.active { background: var(--primary-50); }
.mt-opt-code { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--primary); }
.mt-opt-name { flex: 1; min-width: 0; }
.mt-opt-note { flex: none; font-size: .75rem; color: var(--amber-dark); }
.mt-list-empty { padding: 14px; color: var(--text-secondary); font-size: .9rem; }

/* สถานะโหลด/ผิดพลาด */
.mt-loading { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 16px 20px; margin-bottom: 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); color: var(--text-secondary); }
.mt-loading[hidden], .mt-error[hidden], .mt-toast[hidden] { display: none; }
.mt-spin { width: 18px; height: 18px; border: 3px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; animation: mt-spin .8s linear infinite; }
@keyframes mt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mt-spin { animation-duration: 3s; } }
.mt-error { position: relative; z-index: 1; padding: 14px 18px; margin-bottom: 20px; background: #fef2f2; border: 1.5px solid #fecaca; border-radius: var(--radius-sm); color: #991b1b; }
.mt-error button { margin-left: 10px; }
.mt-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 10px 18px; background: var(--primary-dark); color: #fff; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow-lg); }

/* ขั้น 2 */
.mt-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 16px; margin-bottom: 14px; background: var(--primary-50); border-radius: var(--radius-sm); }
.mt-banner b { font-size: 1.1rem; color: var(--primary-dark); }
.mt-banner span { font-size: .88rem; color: var(--text-secondary); }
.mt-banner a { font-size: .88rem; margin-left: auto; }
.mt-sum { margin: 0 0 14px; font-size: .95rem; line-height: 1.6; }
/* แยกชั้นปีเป็นคอลัมน์เท่ากัน ปวช. 3 · ปวส. 2 จำนวนจริงมาจาก --years ในหน้าเว็บ */
.mt-years { display: grid; grid-template-columns: repeat(var(--years, 3), minmax(0, 1fr)); gap: 14px; }
.mt-year { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1.5px solid var(--primary-100); border-radius: var(--radius-sm); }
.mt-year-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 10px 14px; background: var(--primary-50); border-bottom: 1.5px solid var(--primary-100); border-radius: calc(var(--radius-sm) - 2px) calc(var(--radius-sm) - 2px) 0 0; }
.mt-year-head h3 { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--primary-dark); }
.mt-year-count { font-size: .84rem; font-weight: 600; color: var(--text-secondary); }
.mt-year-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px; }
/* คอลัมน์กว้างวางการ์ดได้ 2 ใบ คอลัมน์แคบเรียงเดี่ยว */
.mt-year-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.mt-year-foot { margin-top: auto; padding-top: 4px; }
.mt-year-foot .mt-more-outcomes { margin-top: 0; }
.mt-wow { margin: 4px 0 8px; line-height: 1.7; max-width: 78ch; }
.mt-occ-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mt-level-tag { flex: none; padding: 1px 8px; background: var(--amber-100); border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.5; color: #78350f; white-space: nowrap; }
.mt-dsd { padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); }
.mt-dsd-title { margin: 0 0 6px; font-size: .86rem; font-weight: 700; line-height: 1.5; }
.mt-dsd-title small { display: block; font-weight: 400; color: var(--text-secondary); }
.mt-dsd ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: .88rem; line-height: 1.5; }
.mt-dsd li { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mt-mark { padding: 0 3px; border-radius: 4px; background: var(--amber-100); color: inherit; font-weight: 600; }
.mt-mark.other { background: var(--bg); font-weight: 500; }
.mt-mark.near { background: none; font-weight: 600; border-bottom: 2px dashed var(--amber-dark); border-radius: 0; }
.mt-near { padding: 10px 12px 12px; background: var(--amber-50); border: 1.5px dashed var(--amber-100); border-radius: var(--radius-sm); }
.mt-near-title { margin: 0 0 8px; font-size: .86rem; font-weight: 600; line-height: 1.5; color: #78350f; }
.mt-occ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.mt-occ { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font: inherit; text-align: left; color: var(--text); cursor: pointer; transition: var(--transition); }
.mt-occ:hover:not(:disabled) { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.mt-occ:disabled { background: var(--bg); cursor: not-allowed; color: var(--text-secondary); }
.mt-occ-name { font-weight: 700; line-height: 1.4; }
.mt-occ-meta { font-size: .84rem; color: var(--text-secondary); line-height: 1.45; }
.mt-occ-warn { font-size: .8rem; color: var(--amber-dark); line-height: 1.45; }
.mt-occ-go { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: .85rem; font-weight: 700; color: var(--primary); }
.mt-occ-go .material-symbols-rounded { font-size: 18px; }
.mt-occ-done { color: #166534; }
.mt-none { margin: 0; padding: 10px 14px; background: var(--bg); border-radius: var(--radius-sm); font-size: .88rem; color: var(--text-secondary); line-height: 1.55; }
.mt-others { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--text-secondary); }
.mt-more-outcomes { margin-top: 10px; font-size: .9rem; }
.mt-more-outcomes summary { cursor: pointer; min-height: 32px; color: var(--primary); font-weight: 600; }
.mt-more-outcomes h4 { margin: 10px 0 2px; font-size: .86rem; color: var(--text); }
.mt-more-outcomes p { margin: 0; line-height: 1.6; color: var(--text-secondary); max-width: 78ch; }
.mt-section { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--border); }
.mt-section h3 { margin: 0 0 4px; font-size: 1.02rem; }
.mt-section > p { margin: 0 0 10px; font-size: .86rem; color: var(--text-secondary); line-height: 1.55; }
.mt-search-occ { max-width: 560px; margin-bottom: 10px; }

/* ขั้น 3: แถบอาชีพ */
.mt-occbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: start; padding: 14px 16px; margin-bottom: 12px; background: var(--primary-50); border-radius: var(--radius-sm); }
.mt-occbar h3 { margin: 0; font-size: 1.15rem; color: var(--primary-dark); line-height: 1.4; }
.mt-occbar-sub { margin: 2px 0 0; font-size: .85rem; color: var(--text-secondary); line-height: 1.5; }
.mt-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mt-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.mt-pills > span { font-size: .84rem; color: var(--text-secondary); }
.mt-pill { min-height: 32px; padding: 3px 12px; background: #fff; border: 1.5px solid var(--border); border-radius: 999px; font: inherit; font-size: .84rem; cursor: pointer; color: var(--text); }
.mt-pill:hover { border-color: var(--primary-light); }
.mt-pill[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.mt-progress { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.mt-uoc-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; }
.mt-uoc-stats { flex: 0 1 400px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mt-uoc-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mt-stat { padding: 6px 12px; background: #fff; border: 1.5px solid var(--primary-100); border-radius: var(--radius-sm); }
.mt-stat b { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--primary-dark); }
.mt-stat span { font-size: .84rem; line-height: 1.35; color: var(--text-secondary); }
.mt-stat.ok { background: #f0fdf4; border-color: #bbf7d0; }
.mt-stat.ok b { color: #166534; }
.mt-stat.gap { background: var(--amber-50); border-color: var(--amber-100); }
.mt-stat.gap b { color: #92400e; }
.mt-uoc-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.mt-uoc-line > b { font-size: .95rem; }
.mt-uoc-verdict { margin: 0; font-size: 1rem; font-weight: 700; color: #92400e; }
.mt-uoc-verdict.done { color: #166534; }
.mt-gaps summary { min-height: 32px; font-size: .88rem; font-weight: 600; color: var(--primary); cursor: pointer; }
.mt-gaps ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 4px 16px; margin: 2px 0 0; padding: 0; list-style: none; font-size: .88rem; line-height: 1.5; }
.mt-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mt-bar { flex: 1 1 120px; height: 10px; background: #fff; border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--primary-100); }
.mt-bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width var(--transition); }
.mt-progress small { font-size: .8rem; color: var(--text-secondary); line-height: 1.5; }
.mt-warn { padding: 10px 14px; margin-bottom: 12px; background: var(--amber-50); border: 1.5px solid var(--amber-100); border-radius: var(--radius-sm); font-size: .88rem; line-height: 1.55; color: #78350f; }
.mt-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 2px solid var(--border); }
.mt-tab { min-height: 44px; padding: 8px 16px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; font: inherit; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.mt-tab[aria-selected="true"] { color: var(--primary-dark); border-bottom-color: var(--primary); }

/* ขั้น 3: สองฝั่งเท่ากัน ซ้ายรายวิชา ขวาหน่วยสมรรถนะ ฝั่งรายวิชาตรึงไว้ เทียบได้ตอนเลื่อนดู UoC */
.mt-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.mt-col { min-width: 0; background: #fff; border: 1.5px solid var(--primary-100); border-radius: var(--radius-sm); }
.mt-col-head { padding: 8px 14px; text-align: left; background: var(--primary-50); border-bottom: 1.5px solid var(--primary-100); border-radius: calc(var(--radius-sm) - 2px) calc(var(--radius-sm) - 2px) 0 0; }
.mt-col-head h4 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--primary-dark); }
.mt-col-body { padding: 10px 12px 12px; }
.mt-course-col { position: sticky; top: 8px; display: flex; flex-direction: column; max-height: calc(100vh - 16px); }
.mt-course-col .mt-col-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mt-side > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; background: var(--bg); border-radius: 8px; font-size: .9rem; font-weight: 600; color: var(--primary-dark); cursor: pointer; list-style: none; }
.mt-side > summary::-webkit-details-marker { display: none; }
.mt-side > summary span:first-child { flex: 1; min-width: 0; }
.mt-side-body { display: flex; flex-direction: column; gap: 8px; max-height: min(60vh, 480px); margin-top: 6px; padding: 10px; background: var(--bg); border-radius: var(--radius-sm); }
.mt-side-tools { display: flex; flex-direction: column; gap: 8px; }
.mt-side-tools input, .mt-side-tools select, .mt-unit-filter { width: 100%; min-height: 40px; padding: 8px 12px; background: #fff; border: 1.5px solid var(--border); border-radius: 8px; font: inherit; font-size: .9rem; color: var(--text); }
.mt-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mt-chip { min-height: 32px; padding: 3px 10px; background: #fff; border: 1.5px solid var(--border); border-radius: 999px; font: inherit; font-size: .8rem; color: var(--text); cursor: pointer; }
.mt-chip[aria-pressed="true"] { background: var(--primary-100); border-color: var(--primary-light); font-weight: 700; color: var(--primary-dark); }
.mt-course-list { flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
.mt-course { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; width: 100%; padding: 8px 10px; background: #fff; border: 1.5px solid var(--border); border-radius: 8px; font: inherit; text-align: left; color: var(--text); cursor: pointer; }
.mt-course:hover { border-color: var(--primary-light); }
.mt-course.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-100); }
.mt-course-code { font-size: .8rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.mt-course-name { font-size: .9rem; line-height: 1.4; }
.mt-course-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mt-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.mt-tag.ref { background: #dcfce7; color: #166534; }
.mt-tag.sug { background: var(--amber-100); color: #92400e; }
.mt-tag.on { background: var(--primary-100); color: var(--primary-dark); }
.mt-detail { min-width: 0; }
.mt-cinfo h5 { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.4; }
.mt-cinfo h5 span { color: var(--primary); font-variant-numeric: tabular-nums; }
.mt-cinfo-sub { margin: 2px 0 6px; font-size: .84rem; color: var(--text-secondary); }
.mt-cinfo details { margin-top: 4px; font-size: .9rem; }
.mt-cinfo summary { min-height: 32px; cursor: pointer; font-weight: 600; color: var(--primary-dark); }
.mt-cinfo ol { margin: 4px 0 6px; padding-left: 22px; line-height: 1.6; }
.mt-cinfo p.mt-text { margin: 4px 0 6px; line-height: 1.65; color: var(--text-secondary); white-space: pre-line; }
.mt-units-head { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0 6px; margin-bottom: 2px; background: var(--surface); }
.mt-units-head h5 { margin: 0; font-size: 1rem; font-weight: 700; }
.mt-open-all { min-height: 28px; margin-left: auto; font-weight: 600; }
.mt-open-all[aria-pressed="true"] { background: var(--primary-50); border-color: var(--primary-light); }
.mt-units-live { padding: 2px 10px; background: var(--amber-100); border-radius: 999px; font-size: .82rem; font-weight: 700; line-height: 1.5; color: #78350f; }
.mt-units-live.done { background: #dcfce7; color: #166534; }
.mt-unit-filter { display: block; max-width: 280px; margin: 0 0 8px; }
.mt-legend { margin: 0 0 8px; font-size: .82rem; line-height: 1.55; color: var(--text-secondary); }
.mt-unit { border-top: 1px solid var(--border); }
.mt-unit.is-on { background: #f8fbff; }
.mt-unit-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 6px; }
.mt-unit-check { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; min-height: 32px; cursor: pointer; line-height: 1.5; }
.mt-unit-check input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.mt-unit-name { font-size: .94rem; }
.mt-unit-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px; }
.mt-unit-sub small { font-size: .78rem; color: var(--text-secondary); }
.mt-unit-sub small.mt-unit-gap { font-weight: 600; color: #92400e; }
.mt-more { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 8px; background: #fff; border: 1.5px solid var(--border); border-radius: 8px; font: inherit; font-size: .8rem; color: var(--text); cursor: pointer; white-space: nowrap; }
.mt-more:hover { border-color: var(--primary-light); }
.mt-more .material-symbols-rounded { font-size: 18px; transition: transform var(--transition); }
.mt-more[aria-expanded="true"] .material-symbols-rounded { transform: rotate(180deg); }
.mt-more.some { background: #dcfce7; border-color: #86efac; color: #166534; font-weight: 700; }
.mt-pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.mt-pager-top { margin: 8px 0 10px; }
.mt-pager-top .btn-tool { height: 34px; padding: 4px 10px; font-size: .82rem; }
.mt-pager-top:empty { display: none; }
.mt-save-note { margin: 10px 0 0; font-size: .82rem; color: var(--text-secondary); line-height: 1.55; }
.mt-save-note.bad { color: #991b1b; font-weight: 600; }

/* ขั้น 3: สรุปตามหน่วยสมรรถนะ */
.mt-sumrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 16px; padding: 10px 6px; border-top: 1px solid var(--border); }
.mt-sumrow.gap { background: var(--amber-50); }
.mt-sumrow:first-child { border-top: 0; }
.mt-sum-courses { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.mt-sum-empty { font-size: .86rem; font-weight: 700; color: #92400e; }

@media (max-width: 900px) {
  .mt-years { grid-template-columns: minmax(0, 1fr); }
  .mt-pair { grid-template-columns: minmax(0, 1fr); }
  .mt-course-col { position: static; max-height: none; }
  .mt-course-col .mt-col-body { overflow: visible; }
  .mt-side > summary { min-height: 44px; }
  .mt-occbar { grid-template-columns: 1fr; }
  .mt-actions { justify-content: flex-start; }
  .mt-sumrow { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .link-step { padding: 16px; }
  .mt-level button { padding: 12px 14px; }
  .link-header .header-icon { display: flex; margin: 8px auto 12px; }
  .mt-unit-row { flex-wrap: wrap; }
  .mt-unit-check { flex: 1 1 100%; }
  .mt-more { margin-left: 30px; min-height: 40px; }
  .mt-unit-filter { max-width: none; }
}

/* ข้อมูลสำหรับเอกสารส่งออก (ฝั่งรายวิชา) */
.mt-export-note { grid-column: 1 / -1; margin: 0; padding: 7px 10px; font-size: .84rem; line-height: 1.5; color: #854d0e; background: #fef9c3; border-radius: 6px; }
.mt-doc { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.mt-doc-label { margin: 6px 0 2px; font-size: .84rem; font-weight: 600; color: var(--text-secondary); }
.mt-doc textarea { width: 100%; box-sizing: border-box; padding: 7px 9px; font: inherit; font-size: .88rem; line-height: 1.5; resize: vertical; border: 1.5px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); }
.mt-doc textarea:focus { outline: 2px solid var(--primary-light); outline-offset: 1px; }

/* หน้ากระดาษของ PDF วาดนอกจอแล้วถ่ายเป็นภาพ (public/match-sheet.js) · ⛔ padding บนล่างต้องตรงกับ PAGE_PAD */
.ms-page { position: relative; box-sizing: border-box; width: 1123px; min-height: 794px; padding: 26px 28px; background: #fff; color: #000; font-family: 'Sarabun', sans-serif; font-size: 11.5px; line-height: 1.38; }
.ms-title { text-align: center; font-size: 16px; font-weight: 700; }
.ms-program { margin: 4px 0 8px; font-size: 12.5px; font-weight: 700; line-height: 1.45; }
.ms-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ms-table th, .ms-table td { padding: 3px 5px; border: 1px solid #000; vertical-align: top; text-align: left; font-weight: 400; word-wrap: break-word; background: #fff; color: #000; }
.ms-table th { text-align: center; vertical-align: middle; font-weight: 700; font-size: 12px; }
.ms-table .ms-col { white-space: pre-line; font-size: 11.5px; }
.ms-table .ms-todo { background: #fff2cc; }
.ms-std { font-size: 13px; }
.ms-code { font-variant-numeric: tabular-nums; }
.ms-pc + .ms-pc { margin-top: 3px; }
.ms-pre { white-space: pre-line; }
.ms-method { display: flex; gap: 4px; align-items: flex-start; }
.ms-box { flex: none; display: inline-block; box-sizing: border-box; width: 11px; height: 11px; margin-top: 2px; border: 1px solid #000; font-size: 11px; line-height: 9px; text-align: center; font-weight: 700; }
.ms-foot { padding-top: 8px; }
.ms-sum { text-align: center; font-size: 12.5px; }
.ms-note { margin-top: 4px; font-size: 11.5px; }
.ms-pageno { position: absolute; right: 28px; bottom: 10px; font-size: 10px; color: #475569; }
