/* ── ธีม (ทันสมัย = ค่าเริ่มต้น, เดิม = data-theme="classic" บน <html>) ──
   สลับธีมได้ที่ ตั้งค่าระบบ — เปลี่ยนแค่ตัวแปรสี ไม่กระทบโครงสร้าง/ฟอนต์ ── */
:root {
  --bg: linear-gradient(180deg, #EEF1FE 0%, #F8F9FF 100%);
  --accent: #5B6EF5;
  --accent-2: #9B6BF3;
  --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --accent-hover: #4657D6;
  --accent-soft-bg: #EEF0FF;
  --accent-soft-text: #4F5FD9;
  --card-bg: #fff;
  --card-border: #E7E9F5;
  --card-radius: 16px;
  --card-shadow: 0 6px 24px -8px rgba(79,90,220,.16), 0 2px 8px -3px rgba(79,90,220,.08);
  --btn-radius: 10px;
  --input-radius: 10px;
  --header-shadow: 0 1px 0 rgba(80,90,200,.05), 0 8px 20px -14px rgba(80,90,200,.35);
  --danger-bg: linear-gradient(135deg, #C4386E, #B22C2C);
}
[data-theme="classic"] {
  --bg: #F6F6F7;
  --accent: #C42B77;
  --accent-2: #C42B77;
  --accent-grad: #C42B77;
  --accent-hover: #A8225F;
  --accent-soft-bg: #FBEFF5;
  --accent-soft-text: #C42B77;
  --card-bg: #fff;
  --card-border: #E4E4E7;
  --card-radius: 12px;
  --card-shadow: none;
  --btn-radius: 7px;
  --input-radius: 8px;
  --header-shadow: none;
  --danger-bg: #B22C2C;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: #17171A; font-family: 'Sarabun', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
input, select, button, textarea { font-family: inherit; font-size: inherit; color: inherit; }
select, option { font-family: 'Sarabun', system-ui, sans-serif; }
/* ดรอปดาวน์ที่ไม่ได้กำหนดสไตล์เอง (ไม่อยู่ใน .field) เดิมใช้ค่าเริ่มต้นของเบราว์เซอร์ ตัวใหญ่กว่าข้อความรอบ ๆ */
select { padding: 9px 11px; border: 1px solid #D8D8DC; border-radius: 8px; background: #fff; font-size: 14px; color: #17171A; max-width: 100%; }
/* ช่องพิมพ์ที่ไม่ได้อยู่ใน .field และไม่ได้กำหนดสไตล์เอง เดิมใช้ค่าเริ่มต้นของเบราว์เซอร์ (ตัวใหญ่ ขอบดำ) — ตั้งค่ากลางแบบเดียวกับ select */
input:not([type]), input[type=text], input[type=search], input[type=tel], input[type=number], input[type=email], input[type=password], textarea {
  padding: 9px 11px; border: 1px solid #D8D8DC; border-radius: 8px; background: #fff; font-size: 14px; color: #17171A; max-width: 100%; box-sizing: border-box;
}
input:not([type]):disabled, input[type=text]:disabled, textarea:disabled { background: #F5F5F7; color: #8A8A92; }
input:not([type]):focus, input[type=text]:focus, input[type=search]:focus, textarea:focus { outline: none; border-color: var(--accent); }
/* Safari วาด select แบบของระบบ (มุมเหลี่ยม เส้นดำ) ไม่สนขอบมน/ระยะห่าง → ปิดหน้าตาเดิมแล้ววาดลูกศรเอง
   ใช้ !important เพราะหลายจุดตั้ง background:#fff แบบ inline ซึ่งจะล้างรูปลูกศรทิ้ง */
select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236E6E76' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 11px center !important; background-size: 12px 8px !important;
  padding-right: 32px !important;
}
select:disabled { opacity: .6; }
/* ── ดรอปดาวน์ทุกอัน : ฟอนต์ Sarabun ตัวปกติ ขนาดเดียวกันทั้งเว็บ (คอม 14px · มือถือ 16px กันซูม) สูงเท่ากัน ──
   ใช้ !important ทับสไตล์ inline ที่เคยตั้งขนาด/ระยะไม่เท่ากันในแต่ละหน้า */
select, select option { font-family: 'Sarabun', system-ui, sans-serif !important; font-size: 14px !important; font-weight: 400 !important; }
select { line-height: 1.4 !important; padding-top: 9px !important; padding-bottom: 9px !important; min-height: 40px; color: #17171A; }
table { border-collapse: collapse; width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
.heading { font-family: 'Sarabun', sans-serif; font-weight: 700 !important; letter-spacing: -.005em; }
button { cursor: pointer; }

.app-root { min-height: 100vh; display: flex; flex-direction: column; }

/* ── header ─────────────────────────────────────────────── */
.site-header { background: #fff; border-bottom: 1px solid #E4E4E7; box-shadow: var(--header-shadow); position: sticky; top: 0; z-index: 20; }
.site-header-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.site-logo { width: 46px; height: 46px; object-fit: contain; flex: none; }
.site-title { font-family: 'Sarabun', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -.01em; line-height: 1.2; }
.site-sub { font-size: 12.5px; color: #6E6E76; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { border: none; background: none; padding: 8px 11px; border-radius: 7px; font-size: 13.5px; color: #4B4B52; cursor: pointer; text-decoration: none; }
.nav-link:hover { color: var(--accent); background: var(--accent-soft-bg); text-decoration: none; }
.nav-toggle-checkbox { display: none; }
.nav-toggle-btn { display: none; }

/* ── มือถือ: หัวเว็บย่อ + เมนูพับเก็บ (แฮมเบอร์เกอร์) ───────────────── */
@media (max-width: 860px) {
  .site-header-inner { position: relative; flex-wrap: wrap; padding: 10px 14px; }
  .site-logo { width: 36px; height: 36px; }
  .site-title { font-size: 14.5px; line-height: 1.3; }
  .site-sub { display: none; }
  .nav-toggle-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 1px solid #D8D8DC; border-radius: 8px;
    background: #fff; font-size: 18px; cursor: pointer; flex: none;
  }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    background: #fff; border-top: 1px solid #E4E4E7; border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 30px -10px rgba(30,30,60,.25);
    padding: 12px 14px 16px; gap: 8px; z-index: 30; max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .nav-toggle-checkbox:checked ~ .site-nav { display: flex; }
  .site-nav .btn, .site-nav .nav-link { width: 100%; text-align: left; }
  .site-nav > div { width: 100%; }
  /* ชื่อผู้ใช้ในเมนูมือถือ : แถวเต็มความกว้าง ไม่ถูกบีบเป็นแนวตั้ง แล้วลิงก์เรียงลงมาด้านล่าง */
  .site-nav .nav-user { flex-direction: column; align-items: stretch !important; gap: 4px !important; border-left: none !important; border-top: 1px solid #E4E4E7; padding: 10px 0 0 !important; margin-top: 4px; }
  .site-nav .nav-user-name { flex-direction: row !important; align-items: baseline !important; gap: 8px; padding: 0 12px 4px; flex-wrap: wrap; }
}

.main { flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 26px 20px 60px; }

/* ── buttons ────────────────────────────────────────────── */
.btn { padding: 8px 13px; border: 1px solid #D8D8DC; background: #fff; border-radius: var(--btn-radius); font-size: 13.5px; transition: border-color .15s, color .15s, box-shadow .15s, background .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { border: none; background: var(--accent-grad); color: #fff; box-shadow: 0 4px 14px -4px rgba(91,110,245,.5); }
.btn-primary:hover { filter: brightness(.95); color: #fff; }
.btn-dark { border: none; background: #17171A; color: #fff; }
.btn-dark:hover { background: #2A2A30; color: #fff; }
.btn-danger-outline { border: 1px solid #B22C2C; background: #B22C2C; color: #fff; }
.btn-danger-outline:hover { background: #8E2020; color: #fff; }
.btn-danger-ghost { border: 1px solid #E4C4C4; background: #fff; color: #B22C2C; }
.btn-danger-ghost:hover { background: #FCF0F0; }
.btn-dashed { border: 1px dashed var(--accent); background: var(--accent-soft-bg); color: var(--accent-soft-text); }
.btn-dashed:hover { filter: brightness(.97); }
.btn-sm { padding: 6px 10px; border-radius: calc(var(--btn-radius) - 3px); font-size: 12.5px; }
.btn-text-danger { color: #B22C2C; }
.btn[disabled] { opacity: .55; cursor: default; }

/* ── forms ──────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: #6E6E76; }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid #D8D8DC; border-radius: var(--input-radius); font-size: 14px; color: #17171A; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { line-height: 1.6; resize: vertical; }

/* ── ช่องกรอกวันที่ (พิมพ์เอง วว/ดด/ปปปป + ปุ่มเปิดปฏิทิน) ───────── */
.date-field-wrap { position: relative; display: flex; align-items: center; }
.date-field-wrap input[data-action]:not([type=date]) { flex: 1; min-width: 0; padding-right: 30px !important; }
.date-field-wrap .cal-native { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; border: none; padding: 0; pointer-events: none; }
.date-field-wrap .cal-btn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); border: none; background: none; cursor: pointer; font-size: 13.5px; line-height: 1; padding: 4px 5px; border-radius: 5px; color: #8A8A92; }
.date-field-wrap .cal-btn:hover { color: var(--accent); background: #F5F5F7; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.err-box { font-size: 13px; color: #B22C2C; background: #FCF0F0; border: 1px solid #F3D9D9; border-radius: 7px; padding: 9px 11px; }
.msg-box { font-size: 13.5px; background: #FAFAFB; border: 1px solid #E4E4E7; border-radius: 7px; padding: 10px 12px; word-break: break-word; }
.ok-box { font-size: 13.5px; background: #F3F8F4; border: 1px solid #D9E8DD; color: #2C5F3A; border-radius: 7px; padding: 10px 12px; }

/* ── cards ──────────────────────────────────────────────── */
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 18px; }
.card-flat { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); overflow: hidden; }
.card-header { padding: 13px 18px; border-bottom: 1px solid #EFEFF1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dashed-card { background: var(--card-bg); border: 1px dashed #DCDCE0; border-radius: var(--card-radius); padding: 40px 20px; text-align: center; color: #6E6E76; font-size: 14px; }

/* ── table ──────────────────────────────────────────────── */
.tbl { width: 100%; font-size: 13.5px; }
.tbl thead tr { background: #FAFAFB; color: #6E6E76; text-align: left; }
.tbl th { padding: 10px 14px; font-weight: 500; white-space: nowrap; }
.tbl td { padding: 10px 14px; }
.tbl tbody tr { border-top: 1px solid #F1F1F3; }
.tbl-scroll { overflow-x: auto; }

/* ── badges ─────────────────────────────────────────────── */
.badge { font-size: 11.5px; padding: 2.5px 8px; border-radius: 20px; background: #F1F1F3; color: #4B4B52; display: inline-block; }
.badge-pink { background: var(--accent-soft-bg); color: var(--accent-soft-text); font-weight: 500; }

/* ── admin layout ───────────────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 22px; align-items: start; }
.side-nav { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 96px; }
.side-nav button { text-align: left; padding: 10px 12px; border: none; border-radius: calc(var(--btn-radius) - 2px); font-size: 13.5px; background: transparent; color: #4B4B52; }
.side-nav button.active { background: var(--accent-soft-bg); color: var(--accent-soft-text); font-weight: 600; }
.tab-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ── home ───────────────────────────────────────────────── */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.post-item { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: calc(var(--card-radius) - 4px); box-shadow: var(--card-shadow); padding: 15px 17px; display: flex; gap: 14px; align-items: flex-start; }
.post-date { display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 2px; flex: none; width: 52px; }
.post-day { font-family: 'Sarabun', sans-serif; font-size: 19px; font-weight: 600; line-height: 1; }
.post-monthyear { font-size: 11.5px; color: #6E6E76; }

/* รายการประกาศแบบบล็อก — บรรทัดละรายการ */
.post-list { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: calc(var(--card-radius) - 4px); box-shadow: var(--card-shadow); padding: 4px 16px; }
.post-list-flat { box-shadow: none; padding: 0 12px; }
.post-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid #EFEFF1; }
.post-row:first-child { border-top: none; }
.post-row-date { flex: none; width: 92px; font-size: 12.5px; color: #8A8A92; font-variant-numeric: tabular-nums; }
.post-row-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.post-row-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; color: #17171A; line-height: 1.45; text-decoration: none; }
.post-row-title:hover { color: var(--accent-soft-text); text-decoration: underline; }
.post-pin { font-size: 12px; margin-right: 5px; }
.post-row-meta { flex: none; font-size: 12px; color: #8A8A92; white-space: nowrap; }
/* กล่องประกาศ/งานทะเบียนบนหน้าแรก — หัวกล่องมีสีให้เห็นชัด */
.post-section { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); overflow: hidden; }
.post-section .post-list { padding: 2px 18px 6px; }
.post-section .pager { margin: 0 0 14px; }
.post-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--sec-bg); border-bottom: 1px solid var(--sec-line); }
.post-head-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--sec-color); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.post-head-title { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.01em; color: var(--sec-text); }
.post-head-count { font-size: 12.5px; font-weight: 500; color: var(--sec-text); background: #fff; border: 1px solid var(--sec-line); border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.post-head-hint { font-size: 12px; color: #8A8A92; margin-left: auto; }
.post-section-announce { --sec-color: var(--accent); --sec-bg: var(--accent-soft-bg); --sec-line: #DCE0FB; --sec-text: var(--accent-soft-text); border-top: 4px solid var(--accent); }
.post-section-doc { --sec-color: #2B8A6E; --sec-bg: #EAF6F1; --sec-line: #CFE8DD; --sec-text: #1F6B55; border-top: 4px solid #2B8A6E; }
[data-theme="classic"] .post-section-announce { --sec-line: #F3D3E3; }
.post-section .post-row-title { font-weight: 600; font-size: 15px; }
.post-kind { flex: none; min-width: 46px; text-align: center; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: #F1F1F3; color: #6E6E76; }
.post-kind.kind-pdf { background: #FCECEC; color: #B22C2C; }
.post-kind.kind-word { background: #EAF0FB; color: #2B5CB0; }
.post-kind.kind-excel { background: #E8F4EC; color: #23794A; }
.post-kind.kind-img { background: #FDF3E3; color: #9A6212; }
.post-kind.kind-link { background: #EEF0FF; color: #4F5FD9; }
.post-new { display: inline-block; margin-left: 8px; font-size: 10.5px; font-weight: 700; color: #fff; background: #E0446F; border-radius: 20px; padding: 1px 8px; vertical-align: 2px; letter-spacing: .02em; }
.post-row-tools { flex: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.post-move { display: inline-flex; gap: 3px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 12px; flex-wrap: wrap; }
.pager-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--card-border); border-radius: 7px; background: var(--card-bg); color: #4B4B52; font-size: 13px; cursor: pointer; }
.pager-btn:hover:not(:disabled) { background: #F4F4F6; }
.pager-btn.active { background: #17171A; border-color: #17171A; color: #fff; font-weight: 600; }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-gap { color: #8A8A92; font-size: 13px; padding: 0 2px; }

/* โปสเตอร์ผู้บริหาร/หัวหน้าระดับ — มือถือย่อลงแต่คงแถวเดียวเหมือนคอม */
.poster-row { display: flex; gap: var(--poster-gap, 36px); flex-wrap: wrap; justify-content: center; }
.poster-person { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 180px; }
.poster-photo { width: 110px; height: 110px; border-radius: 12px; overflow: hidden; background: #F1F1F3; border: 1px solid #E9E9EC; flex-shrink: 0; }
.poster-caption { text-align: center; line-height: 1.35; }
.poster-name { font-size: 13px; font-weight: 600; color: #17171A; white-space: nowrap; }
.poster-label { font-size: 12px; color: #6E6E76; white-space: nowrap; }
.poster-break { display: none; }
@media (max-width: 760px) {
  .poster-row { flex-wrap: nowrap; gap: 8px; justify-content: space-between; }
  .poster-person { flex: 1 1 0; width: auto; min-width: 0; max-width: 140px; gap: 6px; }
  .poster-photo { width: 100%; max-width: 110px; height: auto; aspect-ratio: 1 / 1; border-radius: 9px; }
  .poster-name, .poster-label { white-space: normal; word-break: break-word; }
  .poster-name { font-size: 11px; }
  .poster-label { font-size: 10px; }
  /* ผู้บริหาร 2 + 3 คน ขนาดเท่าช่องของงานระดับชั้น (3 คนต่อแถว) */
  .poster-row-affairs { flex-wrap: wrap; justify-content: center; row-gap: 7px; }
  .poster-row-affairs .poster-person { flex: 0 1 calc((100% - 16px) / 3); }
  .poster-row-affairs .poster-break { display: block; flex-basis: 100%; height: 0; }
}
@media (max-width: 600px) {
  .post-row { flex-wrap: wrap; gap: 4px 10px; }
  .post-row-date { width: auto; order: 3; font-size: 11.5px; }
  .post-kind { order: 2; min-width: 0; font-size: 10.5px; padding: 2px 6px; }
  .post-head { padding: 12px 14px; }
  .post-head-hint { display: none; }
  .post-section .post-list { padding: 2px 14px 6px; }
  .post-row-main { flex-basis: 100%; order: 1; flex-direction: column; gap: 2px; }
  .post-row-meta { order: 4; font-size: 11.5px; }
  .post-row-tools { order: 5; margin-left: auto; }
}
.emergency-box { background: var(--danger-bg); border-radius: calc(var(--card-radius) - 4px); box-shadow: var(--card-shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.login-box { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: calc(var(--card-radius) - 4px); box-shadow: var(--card-shadow); padding: 16px; }
.stat-row { display: flex; justify-content: space-between; font-size: 13.5px; }

@media (max-width: 900px) {
  .home-grid, .admin-grid { grid-template-columns: 1fr; }
  .side-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  /* หน้า ปค. และคู่มือครูที่ปรึกษา กำหนดความกว้างคอลัมน์ซ้ายเป็น px ตรง ๆ (inline style)
     ต้องใช้ !important บังคับทับ ไม่งั้นเนื้อหาขวาจะถูกบีบแคบมากจนอ่านไม่ได้บนมือถือ */
  .side-content-grid { grid-template-columns: 1fr !important; }
}

/* ── login ──────────────────────────────────────────────── */
.login-card { max-width: 420px; margin: 34px auto; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 26px; }

/* ── toast / modal ──────────────────────────────────────── */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #17171A; color: #fff; padding: 11px 18px; border-radius: 9px; font-size: 13.5px; z-index: 50; }
.modal-overlay { position: fixed; inset: 0; background: rgba(20,20,24,.42); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 40; }
.modal-box { background: var(--card-bg); border-radius: var(--card-radius); box-shadow: 0 20px 50px -12px rgba(30,30,60,.35); width: 100%; max-width: 660px; padding: 22px; }
.modal-header { display: flex; align-items: center; margin-bottom: 16px; }
.modal-close { border: none; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: #8A8A92; padding: 0 4px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 12px; }

.grow { flex: 1; }
.muted { color: #6E6E76; }
.center { text-align: center; }

/* ── กล่องช่วยเหลือ (ปุ่มลอยมุมจอ) ──────────────────────── */
.help-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 45;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: var(--accent-grad); color: #fff; font-size: 21px;
  box-shadow: 0 10px 24px -6px rgba(91,110,245,.55);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.help-fab:hover { filter: brightness(.96); }
.help-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 45;
  width: 340px; max-width: calc(100vw - 32px); max-height: min(70vh, 560px);
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius);
  box-shadow: 0 20px 50px -12px rgba(30,30,60,.3);
  display: flex; flex-direction: column; overflow: hidden;
}
.help-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #EFEFF1; flex: none; }
.help-panel-body { padding: 14px 16px 18px; overflow-y: auto; }
.help-item { display: block; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid #F3E3C0; background: #FDF4E7; color: #8A5A12; border-radius: 8px; font-size: 12.5px; cursor: pointer; line-height: 1.5; }
.help-item:hover { filter: brightness(.97); }
.help-faq { border-top: 1px solid #F1F1F3; padding: 8px 0; font-size: 12.5px; }
.help-faq:first-of-type { border-top: none; }
.help-faq summary { cursor: pointer; font-weight: 500; }
.help-faq p { color: #6E6E76; margin: 6px 0; line-height: 1.6; }
@media (max-width: 480px) {
  .help-fab { right: 14px; bottom: 14px; }
  .help-panel { right: 10px; left: 10px; width: auto; bottom: 76px; }
}

/* ── หนังสือแจ้งผู้ปกครองเรื่องมาสาย — แบบหนังสือภายนอก (ระเบียบงานสารบรรณ) ใช้ทั้งหน้าตัวอย่างและตอนพิมพ์ ──
   ขอบ ซ้าย 3 / ขวา 2 / บน 1.5 ซม. · TH Sarabun New 16pt · ตราโรงเรียนกึ่งกลางเหนือชื่อโรงเรียน
   ตอนพิมพ์ใช้ @page govdocPg (margin 0) ผ่าน .govdoc-sheet จึงไม่มีหัว/ท้ายกระดาษของเบราว์เซอร์ */
@font-face { font-family: 'TH Sarabun New'; src: url('../assets/fonts/THSarabunNew.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'TH Sarabun New'; src: url('../assets/fonts/THSarabunNew-Bold.ttf') format('truetype'); font-weight: 700; }
.late-letter { background: #fff; color: #000; width: 210mm; min-height: 297mm; margin: 0 auto 20px; padding: 1.5cm 2cm 1.4cm 3cm; box-sizing: border-box; display: flex; flex-direction: column; font-family: 'TH Sarabun New', 'Sarabun', sans-serif; font-size: 16pt; line-height: 1.2; }
.late-letter b { font-weight: 700; }
.late-letter .ll-crest { display: block; height: 2.2cm; width: auto; margin: 0 auto 1mm; }
.late-letter .ll-school { text-align: center; font-weight: 700; }
.late-letter .ll-meta { display: flex; margin-top: 3mm; }
.late-letter .ll-meta .ll-date { margin-left: auto; width: 8cm; }
.late-letter .ll-label { margin-top: 2mm; }
/* หนังสือเชิญแบบบันทึกข้อความ : ครุฑ 1.5 ซม. ชิดซ้าย · หัว "บันทึกข้อความ" กลาง · บรรทัดหัวชิดกัน */
.late-letter.ll-memo .memo-head { min-height: 1.5cm; margin-bottom: 1mm; }
.late-letter.ll-memo .memo-head .memo-crest { height: 1.5cm; }
.late-letter.ll-memo .memo-head .memo-title { font-size: 25pt; }
.late-letter.ll-memo .ll-label { margin-top: 1mm; }
.late-letter.ll-memo .ll-memo-meta { margin-top: 1mm; }
.late-letter.ll-memo .govdoc-rule { margin: 1.5mm 0 0; }
.late-letter.ll-memo.ll-compact .memo-head { min-height: 1.3cm; }
.late-letter.ll-memo.ll-compact .memo-head .memo-crest { height: 1.3cm; }
/* กระจายแบบไทย: เกลี่ยช่องว่างระหว่างตัวอักษร ไม่ใช่ถ่างเฉพาะช่องว่างระหว่างคำ (Safari ไม่รองรับ จะจัดชิดขอบแบบปกติ) */
.late-letter .ll-body { text-indent: 2.5cm; text-align: justify; text-justify: inter-character; margin-top: 2mm; }
.late-letter .ll-tables { display: flex; justify-content: center; gap: 6mm; margin: 2mm 0 1mm; }
.late-letter .ll-table { width: auto; border-collapse: collapse; font-size: 14pt; line-height: 1.1; }
.late-letter .ll-table th, .late-letter .ll-table td { border: 1px solid #000; padding: 0 2.5mm; text-align: center; white-space: nowrap; }
.late-letter .ll-table .ll-left { text-align: left; }
.late-letter .ll-note { text-align: center; font-size: 14pt; }
.late-letter .ll-regards { margin: 3mm 0 0 7cm; width: 7cm; text-align: center; }
.late-letter .ll-signs { display: flex; flex-direction: column; gap: 4.5mm; margin-top: 5mm; font-size: 15pt; }
.late-letter .ll-sign-row { display: flex; justify-content: space-around; }
.late-letter .ll-sign-row.ll-one { justify-content: center; }
.late-letter .ll-sign { display: flex; flex-direction: column; align-items: center; line-height: 1.1; width: 7.5cm; flex: none; }
/* ลายเซ็นภาพ (สัดส่วน 3:1 เส้นฐานอยู่ราว 72% ของความสูง) วางทับเส้นจุด ไม่ดันบรรทัด */
.late-letter .ll-sigdots { position: relative; display: inline-block; }
.late-letter .ll-sigimg { position: absolute; left: 50%; bottom: -0.28cm; height: 1.5cm; width: auto; transform: translateX(-50%); pointer-events: none; }
/* ลายเซ็นรองผู้อำนวยการเขียนต่ำ ยกขึ้นให้พ้นเส้นจุด */
.late-letter .ll-deputy .ll-sigimg { bottom: 0.1cm; }
.late-letter .ll-reply { margin-top: auto; padding-top: 4mm; font-size: 15pt; }
/* เส้นตัดยาวเกือบชิดขอบกระดาษ (ยื่นเข้าไปในขอบซ้าย 3 ซม. / ขวา 2 ซม. เหลือห่างขอบกระดาษ 5 มม.) */
.late-letter .ll-cut { position: relative; margin: 0 -1.5cm 3mm -2.5cm; border-top: 1px dashed #000; text-align: center; font-size: 12pt; line-height: 1; }
.late-letter .ll-cut span { position: relative; top: -0.6em; background: #fff; padding: 0 3mm; color: #333; }
.late-letter .ll-reply-title { text-align: center; font-weight: 700; }
.late-letter .ll-reply-row { display: flex; align-items: flex-end; gap: 4mm; margin-top: 2mm; }
.late-letter .ll-opts { flex: 1; min-width: 0; line-height: 1.25; }
/* มาสายหลายครั้ง (ตาราง 2 ฝั่ง) — ย่อหัวและช่องลงนามให้ทั้งฉบับจบในหน้าเดียว */
.late-letter.ll-compact .ll-crest { height: 1.7cm; }
.late-letter.ll-compact .ll-meta { margin-top: 1mm; }
.late-letter.ll-compact .ll-label, .late-letter.ll-compact .ll-body { margin-top: 1mm; }
.late-letter.ll-compact .ll-regards { margin-top: 1mm; }
.late-letter.ll-compact .ll-signs { gap: 3.5mm; margin-top: 3mm; font-size: 14pt; }
.late-letter.ll-compact .ll-sign { line-height: 1.02; }
.late-letter.ll-compact .ll-reply { padding-top: 2mm; font-size: 14pt; }
.late-letter.ll-compact .ll-cut { margin-bottom: 1mm; }
.late-letter.ll-compact .ll-tables { gap: 3mm; }
.late-letter.ll-compact .ll-table th, .late-letter.ll-compact .ll-table td { padding: 0 1.4mm; }

/* บันทึกข้อความแบบมาตรฐาน: ครุฑ 1.8 ซม. ชิดซ้าย · คำว่า "บันทึกข้อความ" กึ่งกลางหน้ากระดาษ ระดับกลางครุฑ */
.memo-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 1.8cm; margin-bottom: 4px; }
.memo-head .memo-crest { position: absolute; left: 0; top: 0; height: 1.8cm; width: auto; }
.memo-head .memo-title { font-size: 20pt; font-weight: 700; }
/* บรรทัดเส้นประเต็มความกว้าง (ช่องเขียนความเห็น) — ข้อความนำหน้าได้ เส้นประยาวจนสุดคอลัมน์ */
.dot-line { display: flex; align-items: baseline; gap: 4px; line-height: 1.3; }
.dot-line::before { content: '\200b'; }
.dot-line::after { content: ''; flex: 1; border-bottom: 1px dotted #000; }

/* ── แบบ ปค. (ทางการ) : ใช้ร่วมกับ .govdoc-sheet ── ขอบ 3/2/1.5 ซม. TH Sarabun New ทั้งบนจอและตอนพิมพ์ */
.pc-sheet { background: #fff; color: #000; width: 210mm; min-height: 297mm; margin: 0 auto 20px; padding: 1.5cm 2cm 1.4cm 3cm; box-sizing: border-box; display: flex; flex-direction: column; font-family: 'TH Sarabun New', 'Sarabun', sans-serif; font-size: 16pt; line-height: 1.22; }
.pc-sheet b { font-weight: 700; }
.pc-sheet .pc-code { position: absolute; right: 2cm; top: 1cm; font-size: 13pt; }
.pc-sheet { position: relative; }
.pc-sheet .pc-crest { display: block; height: 2.4cm; width: auto; margin: 0 auto 1mm; }
.pc-sheet .pc-title { text-align: center; font-weight: 700; font-size: 18pt; }
.pc-sheet .pc-sub { text-align: center; }
.pc-sheet .pc-right { text-align: right; }
.pc-sheet .pc-p { text-indent: 2.5cm; text-align: justify; margin-top: 1.5mm; }
.pc-sheet .pc-detail { margin-top: 0.5mm; }
.pc-sheet .pc-box { white-space: pre-wrap; border-bottom: 1px dotted #000; min-height: 1.25em; }
.pc-sheet .pc-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8mm; padding-left: 1.2cm; margin-top: 1mm; }
.pc-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5mm 6mm; margin-top: 6mm; font-size: 15pt; }
.pc-signs .pc-one { grid-column: 1 / -1; }
.pc-sign { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.12; }
.pc-sheet .pc-note { font-size: 14pt; }
/* พิมพ์ไม่ถูกย่อ : สูง 268mm พอดีพื้นที่พิมพ์แม้เครื่องพิมพ์เว้นขอบเอง (แบบเดียวกับหนังสือเชิญ) */
@media print { .pc-sheet.govdoc-sheet { padding: 1.5cm 2cm 1.4cm 3cm !important; line-height: 1.22 !important; min-height: 268mm !important; height: auto !important; break-inside: avoid; } }
/* ลายเซ็นสแกนในแบบ ปค. : ขนาดเดียวกับหนังสือเชิญ (2 เท่า) วางทับเส้นจุด */
.pc-signs .ll-sigdots { position: relative; display: inline-block; }
.pc-signs .ll-sigimg { position: absolute; left: 50%; bottom: -0.45cm; height: 2.5cm; width: auto; max-width: 6.4cm; object-fit: contain; transform: translateX(-50%); pointer-events: none; }
.pc-signs.has-sig { row-gap: 1mm; }
.pc-signs.has-sig .pc-sign { padding-top: 0.8cm; }
.pc-signs.pc-single { display: block; margin-top: 4mm; }
/* ใบปะหน้าเสนอผู้อำนวยการ */
.pc-sheet.pc-cover { font-size: 15pt; line-height: 1.2; }
.pc-sheet.pc-cover .govdoc-justify { text-align: justify; text-indent: 2.5cm; }
.pc-cover-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin-top: auto; padding-top: 4mm; font-size: 14.5pt; }
.pc-cover-dir > div { display: flex; flex-direction: column; gap: 1px; }
.pc-sheet .pc-checks .ab-line { margin: 0.3mm 0; }
.pc-sheet .pc-checks .ab-line { align-items: flex-start; }
.pc-sheet .pc-checks .ab-box { margin-top: 0.28em; }
.pc-sheet .pc-p, .pc-sheet.pc-cover .govdoc-justify { text-justify: inter-character; }

/* ช่องในตารางแดชบอร์ดที่กดดูรายชื่อนักเรียนได้ */
.dash-cell { border: none; background: none; padding: 0; cursor: pointer; font: inherit; text-align: left; }
.dash-cell:hover > span { filter: brightness(.95); text-decoration: underline; }

/* ── พิมพ์เอกสาร ────────────────────────────────────────── */
@media print {
  @page { size: A4 portrait; margin: 14mm 14mm 16mm 18mm; }
  html, body { background: #fff; }
  .app-root { display: none !important; }
  .no-print { display: none !important; }
  .print-doc { position: static !important; overflow: visible !important; padding: 0 !important; background: #fff !important; }
  .print-sheet { box-shadow: none !important; border: none !important; margin: 0 !important; padding: 0 !important; width: auto !important; min-height: 267mm !important; display: flex !important; flex-direction: column !important; }
  .landscape-sheet { min-height: 186mm !important; }
  .page-break { break-after: page; page-break-after: always; }
  @page landscapePg { size: A4 landscape; margin: 12mm; }
  .landscape-sheet { page: landscapePg; }

  /* ── บันทึกข้อความราชการ (ปค.1 / ปค.2) — ตามระเบียบงานสารบรรณ พ.ศ. 2526 ── */
  @font-face { font-family: 'TH Sarabun New'; src: url('../assets/fonts/THSarabunNew.ttf') format('truetype'); font-weight: 400; font-style: normal; }
  @font-face { font-family: 'TH Sarabun New'; src: url('../assets/fonts/THSarabunNew-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; }
  @font-face { font-family: 'TH Sarabun New'; src: url('../assets/fonts/THSarabunNew-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; }
  @font-face { font-family: 'TH Sarabun New'; src: url('../assets/fonts/THSarabunNew-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; }

  @page govdocPg { size: A4 portrait; margin: 0; }
  .govdoc-sheet {
    page: govdocPg;
    font-family: 'TH Sarabun New', 'Sarabun', sans-serif !important;
    font-size: 16pt !important;
    line-height: 1.15 !important;
    padding: 1.5cm 2cm 2cm 3cm !important;
  }
  .govdoc-sheet div, .govdoc-sheet span { font-family: inherit; }
  .govdoc-sheet .govdoc-title { font-size: 20pt; font-weight: 700; }
  .govdoc-sheet .govdoc-justify { text-align: justify; text-indent: 2.5cm; }
  .govdoc-sheet .govdoc-rule { border: none; border-top: 1px solid #000; margin: 2px 0; }
  .govdoc-sheet .govdoc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
  .govdoc-sheet .govdoc-crest { height: 1.8cm; width: auto; flex: none; }
  .late-letter.govdoc-sheet { padding: 1.5cm 2cm 1.4cm 3cm !important; line-height: 1.2 !important; min-height: 296mm !important; }
}

/* ── บันทึกแจ้งนักเรียนขาดเรียนนาน : ช่องติ๊กขนาดคงที่ (ติ๊กแล้วไม่ขยาย) + ลายเซ็นสแกนวางบนเส้นลงชื่อ ── */
.ab-box { display: inline-flex; align-items: center; justify-content: center; width: 11pt; height: 11pt; border: 1px solid #000; box-sizing: border-box; font-size: 10pt; line-height: 1; font-weight: 700; flex: none; overflow: hidden; }
.ab-line { display: flex; align-items: center; gap: 0.45em; padding-left: 1.2cm; }
.ab-opt { display: inline-flex; align-items: center; gap: 0.35em; margin-left: 0.9em; }
.ab-sign { padding-top: 9mm; }
.ab-sign .ab-sigline { position: relative; }
.ab-sign .ab-sig { position: absolute; left: 50%; bottom: 0.15em; transform: translateX(-30%); height: 1.35cm; width: auto; max-width: 4.2cm; object-fit: contain; mix-blend-mode: multiply; }
.ab-sign .ab-at { font-size: 0.8em; color: #333; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #D92D20; color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1; box-sizing: border-box; }
/* เส้นใต้ "เรื่อง" ในบันทึกข้อความ : ให้เห็นบนจอด้วย (เดิมกำหนดเฉพาะตอนพิมพ์ บนจอ hr ในกล่อง flex หดเหลือจุดเดียว) */
.govdoc-sheet .govdoc-rule { border: none; border-top: 1px solid #000; margin: 2px 0; width: 100%; align-self: stretch; }
/* แถวชื่อนักเรียนขาดเรียนนาน (กดเพื่อเปิด/ปิดแบบฟอร์ม) */
.ab-row { display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none; padding: 2px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ab-row:hover .heading { color: var(--accent); }
.ab-caret { font-size: 20px; color: #6E6E76; width: 18px; flex: none; }
.ab-count { display: flex; flex-direction: column; align-items: center; font-size: 13px; line-height: 1.1; flex: none; }
.ab-count b { font-size: 20px; }
.ab-count > span:last-child { font-size: 11px; color: #8A8A92; }
.ab-count .ab-num { white-space: nowrap; font-size: 14px; }
.ab-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .ab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ตัวเลขแดงบนปุ่มเมนู (มือถือ) เมื่อมีคำร้อง/รายงานรออนุมัติ */
.nav-toggle-btn { position: relative; }
.nav-toggle-badge { position: absolute; top: -6px; right: -6px; border: 2px solid #fff; }
/* ปุ่มเลือกประเภทคำร้อง/รายงาน : เด่นเป็นปุ่ม ไม่กลืนกับพื้น */
.req-type-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--accent); background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; box-shadow: 0 4px 14px -6px rgba(30,30,60,.25); transition: transform .12s, box-shadow .15s, background .15s; }
.req-type-btn:hover { background: var(--accent-soft-bg); box-shadow: 0 8px 22px -8px rgba(30,30,60,.35); transform: translateY(-1px); }
.req-type-btn:active { transform: translateY(0); }
.req-type-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft-bg); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.req-type-title { font-weight: 700; font-size: 16px; color: #17171A; }
.req-type-desc { font-size: 12.5px; color: #6E6E76; line-height: 1.5; }
.req-type-go { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--accent-grad); color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; }

/* ── หน้าแรก : งานของฉัน ── */
.home-work { display: flex; flex-direction: column; gap: 12px; }
.hw-alert { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding: 12px 16px; border-radius: 12px; background: #FCF0F0; border: 1px solid #F0C4C4; color: #8B1D1D; font-size: 14px; }
.hw-group, .hw-overall { background: #fff; border: 1px solid #E4E4E7; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.hw-overall .hw-group { border-color: #EEEEF2; background: #FAFAFB; padding: 10px 12px; }
.hw-group-head, .hw-fold { display: flex; align-items: center; gap: 10px; border: none; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.hw-group-head { width: 100%; }
.hw-group-body { display: flex; flex-direction: column; gap: 8px; }
.hw-caret { font-size: 16px; color: #6E6E76; width: 16px; flex: none; }
.hw-sec { border-top: 1px solid #EEEEF2; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.hw-sec-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.hw-fold { flex: 1; }
.hw-icon { width: 30px; height: 30px; border-radius: 9px; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.hw-title { font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hw-sub { font-size: 12.5px; color: #6E6E76; }
.hw-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 600; }
.hw-count.hw-zero { background: #E4E4E7; color: #6E6E76; }
.hw-go { flex: none; }
.hw-list { display: flex; flex-direction: column; }
.hw-row { display: grid; grid-template-columns: minmax(11em, 1fr) minmax(0, max-content); gap: 2px 12px; padding: 7px 2px; border-bottom: 1px dashed #EEEEF2; font-size: 13.5px; }
.hw-row:last-child { border-bottom: none; }
.hw-main { font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-side { text-align: right; font-size: 12.5px; max-width: 26em; line-height: 1.45; }
.hw-extra { grid-column: 1 / -1; order: 3; font-size: 12px; color: #6E6E76; }
.hw-room { display: inline-block; font-size: 11.5px; padding: 0 6px; margin-right: 6px; border-radius: 6px; background: #EEF0FF; color: #3D4BB8; font-weight: 600; }
.hw-more { align-self: flex-start; border: none; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 0; }
.hw-empty { font-size: 13px; color: #8A8A92; padding: 2px 2px 4px; }
.hw-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hw-stats > div { background: #F4F4F6; border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hw-stats span { font-size: 12px; color: #4B4B52; }
.hw-stats b { font-size: 21px; line-height: 1.2; }
@media (max-width: 640px) {
  .hw-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* มือถือ : ชื่อเต็มบรรทัด แล้วสถานะ/รายละเอียดอยู่บรรทัดถัดไป */
  .hw-row { grid-template-columns: minmax(0, 1fr); }
  .hw-main { white-space: normal; overflow: visible; }
  .hw-side { text-align: left; max-width: none; order: 2; }
}

/* การ์ดเปิด/ปิดแจ้งเตือนบนโทรศัพท์ */
.push-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding: 11px 16px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; }
.push-off { background: var(--accent-soft-bg); border: 1px solid #C9CFFB; color: #2A3590; }
.push-on { background: #EAF3EC; border: 1px solid #B9DCC3; color: #2C5F3A; }
.push-info { background: #FFF8E8; border: 1px solid #F1D7A6; color: #6B4700; }

/* ── ความลื่นไหล (motion) : เปลี่ยนหน้า · ยกการ์ดเมื่อชี้ · ปุ่มยุบเมื่อกด ── */
@keyframes routeEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.main.route-enter > * { animation: routeEnter .32s cubic-bezier(.2,.7,.2,1) both; }
.main.route-enter > *:nth-child(2) { animation-delay: .04s; }
.main.route-enter > *:nth-child(3) { animation-delay: .08s; }
.main.route-enter > *:nth-child(n+4) { animation-delay: .12s; }
.btn, .nav-link, .side-nav button, .hw-fold, .hw-group-head, .ab-row, .dash-cell { transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .2s ease, transform .12s ease; }
.btn:active, .side-nav button:active, .req-type-btn:active, .launch-card:active { transform: scale(.98); }
.side-nav button:hover:not(.active) { background: #F5F6FC; color: var(--accent-soft-text); }
.lift { transition: transform .18s ease, box-shadow .22s ease, border-color .18s ease; }
.lift:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(79,90,220,.35), 0 4px 10px -6px rgba(79,90,220,.15); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { .main.route-enter > * { animation: none; } .lift:hover { transform: none; } html { scroll-behavior: auto; } }

/* ── เมนูข้างแบบโมดูล : ป้ายระบบด้านบน + หัวกลุ่มเล็ก + ไอคอน ── */
.mod-badge { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 6px; border-radius: 12px; background: var(--accent-grad); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: 0 8px 18px -8px rgba(91,110,245,.6); }
.mod-badge .mi { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.2); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.side-nav .nav-group { font-size: 11.5px; font-weight: 600; color: #8A8A92; letter-spacing: .02em; padding: 10px 12px 3px; }
.side-nav button .ni { display: inline-flex; width: 22px; justify-content: center; margin-right: 8px; opacity: .85; }
.side-nav button { display: flex; align-items: center; position: relative; }
.side-nav button.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.side-nav button .nb { margin-left: auto; }

/* ── หัวหน้าโมดูล : breadcrumb + กล่องหัวเรื่องมีไอคอน + ปุ่มหลัก ── */
.crumb { font-size: 13px; color: #6E6E76; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumb b { color: #17171A; font-weight: 600; }
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; background: linear-gradient(180deg, #F7F8FF, #fff); }
.page-head .pi { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; flex: none; box-shadow: 0 8px 18px -8px rgba(91,110,245,.6); }
.page-head .pt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.page-head .pt h1 { margin: 0; font-size: 21px; font-weight: 600; }
.page-head .pt span { font-size: 13px; color: #6E6E76; }

/* ── การ์ดรายการแบบมีขอบซ้ายตามสถานะ ── */
.item-card { position: relative; border-left: 4px solid var(--edge, #C9CFFB) !important; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #6E6E76; }

/* ── หน้าแรก : ระบบของฉัน (launcher) ── */
.launch-group { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; border: 1px solid; }
.launch-group-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.launch-group-head .lc { font-size: 12.5px; font-weight: 500; color: #6E6E76; }
.launch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.launch-card { display: flex; align-items: center; gap: 13px; padding: 14px 14px; border-radius: 16px; background: #fff; border: 1px solid #ECEDF5; box-shadow: 0 4px 14px -8px rgba(30,30,60,.2); font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.launch-card .li { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.launch-card .lt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.launch-card .lt b { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.launch-card .lt span { font-size: 12px; color: #6E6E76; line-height: 1.45; }
.launch-card .lt em { font-style: normal; align-self: flex-start; margin-top: 3px; font-size: 11.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: #F1F2F8; color: #4B4B52; }
.launch-card .lt em.hot { background: #FCF0F0; color: #B22C2C; }
.launch-card .lchev { color: #A0A0A8; font-size: 20px; flex: none; }
@media (max-width: 860px) {
  /* มือถือ : เมนูข้างแบบโมดูลเป็นแถบปุ่มเลื่อนแนวนอน ไม่มีป้ายระบบ/หัวกลุ่ม (เมนูข้างหน้าอื่นคงเดิม) */
  .side-nav.mod-nav { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 6px; gap: 6px; }
  .side-nav.mod-nav::-webkit-scrollbar { display: none; }
  .side-nav.mod-nav .mod-badge, .side-nav.mod-nav .nav-group { display: none; }
  .side-nav.mod-nav button { flex: none; white-space: nowrap; background: #F5F6FC; padding: 8px 12px; }
  .side-nav.mod-nav button.active::before { display: none; }
  .side-nav.mod-nav button .nb { margin-left: 6px; }
  .page-head { padding: 14px; gap: 10px 12px; }
  .page-head .pi { width: 42px; height: 42px; font-size: 20px; border-radius: 12px; }
  .page-head .pt h1 { font-size: 18px; }
  .page-head .pt span { font-size: 12px; }
  .page-head .pt { flex-basis: calc(100% - 60px); }
}

/* ── ใช้งานแบบแอปบนโทรศัพท์ ── */
/* ไม่ซูมเมื่อแตะสองครั้ง · ไม่มีกรอบสีเทาตอนแตะ · ไม่เลื่อนหน้าเด้งเกิน */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
.print-doc { touch-action: auto; }
@media (max-width: 860px) {
  /* iPhone ซูมเองเมื่อแตะช่องกรอกที่ตัวอักษรเล็กกว่า 16px → ตั้งช่องกรอกเป็น 16px บนมือถือ */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
}

/* ── ระบบของฉัน : คอม = การ์ดมีคำอธิบาย · มือถือ = ไอคอนแบบหน้าโฮมโทรศัพท์ (แถวละ 4) ── */
.launch-card .li { position: relative; }
.launch-card .ls, .launch-card .lbadge { display: none; }
@media (max-width: 640px) {
  .home-launch .launch-group { padding: 12px 8px 14px; gap: 8px; border-radius: 18px; }
  .home-launch .launch-group-head { font-size: 13px; padding: 0 6px; }
  .home-launch .launch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px 4px; }
  .home-launch .launch-card { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 4px 2px; background: none; border: none; box-shadow: none; text-align: center; border-radius: 14px; }
  .home-launch .launch-card.lift:hover { transform: none; box-shadow: none; }
  .home-launch .launch-card:active .li { transform: scale(.92); }
  .home-launch .launch-card .li { width: 58px; height: 58px; border-radius: 17px; font-size: 28px; box-shadow: 0 4px 12px -6px rgba(30,30,60,.35), inset 0 0 0 1px rgba(0,0,0,.04); transition: transform .12s ease; }
  .home-launch .launch-card .lt, .home-launch .launch-card .lchev { display: none; }
  .home-launch .launch-card .ls { display: block; font-size: 12px; line-height: 1.3; font-weight: 500; color: #2E2E34; max-width: 100%; word-break: break-word; }
  .home-launch .launch-card .lbadge { display: inline-flex; position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #D92D20; color: #fff; font-size: 11.5px; font-weight: 700; align-items: center; justify-content: center; border: 2px solid #fff; box-sizing: border-box; }
}
/* มือถือ (เข้าสู่ระบบแล้ว) : งานของฉัน / งานทะเบียน ย้ายไปอยู่หลังไอคอน หน้าแรกเหลือไอคอน + ประกาศ */
@media (max-width: 640px) { .home-grid .m-hide { display: none !important; } }

/* ── ไอคอนเส้นในเมนูหน้าแรก ── */
.launch-card .li svg { width: 24px; height: 24px; }
.post-head-icon svg { display: block; }
@media (max-width: 640px) { .home-launch .launch-card .li svg { width: 27px; height: 27px; } }

/* ── แถบเมนูล่างแบบแอป (มือถือเท่านั้น) ── */
.tab-bar { display: none; }
@media (max-width: 860px) {
  .tab-bar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid #E7E9F5; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px -14px rgba(30,30,60,.35); }
  .tab-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; border: none; background: none; font: inherit; font-size: 11px; font-weight: 500; color: #7A7A84; padding: 4px 0; cursor: pointer; transition: color .15s, transform .12s; }
  .tab-btn:active { transform: scale(.92); }
  .tab-btn.on { color: var(--accent); font-weight: 700; }
  .tab-btn.on .tab-ic { background: var(--accent-soft-bg); }
  .tab-ic { position: relative; width: 46px; height: 30px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; transition: background .2s; }
  .tab-badge { position: absolute; top: -3px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #D92D20; color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-sizing: border-box; }
  body:has(.tab-bar) .app-root { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body:has(.tab-bar) .help-fab { bottom: calc(80px + env(safe-area-inset-bottom)); }
  body:has(.tab-bar) .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ── หัวเว็บ (คอม) : เมนูหลัก + "เมนูทั้งหมด" แบบเลื่อนลง ── */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more[open] > summary { color: var(--accent); background: var(--accent-soft-bg); }
.nav-more-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 35; min-width: 270px; background: #fff; border: 1px solid var(--card-border); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(30,30,60,.35); padding: 6px; display: flex; flex-direction: column; gap: 2px; animation: routeEnter .18s ease both; }
.nav-more-list .nav-link { text-align: left; width: 100%; padding: 10px 12px; }
.nav-more-m { display: none; }
@media (max-width: 860px) {
  /* มือถือ : ในเมนู ☰ แสดงเมนูรองต่อกันเลย ไม่ต้องกดเปิดอีกชั้น */
  .nav-more { display: none; }
  .nav-more-m { display: flex; flex-direction: column; gap: 8px; width: 100%; }
}

@media (max-width: 640px) {
  /* งานของฉันบนมือถือ : หัวข้อเต็มบรรทัด ปุ่มไปหน้านั้นอยู่ใต้หัวข้อ */
  .hw-sec-head { gap: 6px; }
  .hw-sec-head .hw-fold { flex-basis: 100%; }
  .hw-sec-head .hw-go { margin-left: 56px; }
}

/* ── หน้าข้อมูลนักเรียน : คอม = ตาราง · มือถือ = การ์ดรายชื่อ (ไม่ต้องเลื่อนไปทางขวา) ── */
.m-only { display: none; }
@media (max-width: 640px) { .m-only { display: block; } .d-only { display: none !important; } }
.stu-list { padding: 4px 12px 8px; }
.stu-card { border-bottom: 1px solid #EEEEF2; }
.stu-card:last-child { border-bottom: none; }
.stu-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 2px; border: none; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.stu-no { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft-bg); color: var(--accent-soft-text); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stu-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.stu-main b { font-size: 14.5px; font-weight: 600; }
.stu-main span { font-size: 12px; color: #6E6E76; }
.stu-chev { color: #A0A0A8; font-size: 18px; flex: none; }

/* ── หนังสือเชิญผู้ปกครอง : ตราใหญ่ขึ้น เว้นระยะชื่อโรงเรียนกับ "ที่" · ช่องลงชื่อรองรับลายเซ็นสแกน ── */
.late-letter.ll-invite .ll-crest { height: 2.6cm; margin-bottom: 1.5mm; }
.late-letter.ll-invite .ll-meta { margin-top: 6mm; }
.late-letter .ll-inv-signs { margin-top: 5mm; font-size: 15pt; gap: 5mm 6mm; }
.late-letter .ll-inv-signs .ll-sigimg { height: 2.5cm; max-width: 6.4cm; object-fit: contain; bottom: -0.45cm; }
/* ใส่ลายเซ็นแล้ว : เว้นที่เหนือเส้นลงชื่อให้ลายเซ็นขนาดใหญ่ ไม่ทับข้อความแถวบน */
.late-letter .ll-inv-signs.has-sig { gap: 1mm 6mm; }
.late-letter .ll-inv-signs.has-sig { margin-top: 1mm; }
.late-letter .ll-inv-signs.has-sig .pc-sign { padding-top: 0.8cm; }
.late-letter.ll-invite:has(.has-sig) .ll-crest { height: 2.3cm; }
.late-letter.ll-invite:has(.has-sig) .ll-meta { margin-top: 4mm; }
.late-letter.ll-invite:has(.has-sig) .ll-reply { padding-top: 4mm; }
.late-letter .ll-inv-signs .pc-sign { line-height: 1.1; }
@media print {
  /* พิมพ์ให้พอดีหน้ากระดาษที่เครื่องพิมพ์/เบราว์เซอร์ให้มาจริง (Safari/iPhone ไม่สนขอบ 0) → ไม่ถูกย่อทั้งหน้า
     สูง 268mm พอดีพื้นที่พิมพ์แม้เครื่องพิมพ์เว้นขอบเอง */
  .late-letter.govdoc-sheet { min-height: 268mm !important; height: auto !important; break-inside: avoid; }
}
.late-letter.ll-invite .ll-reply { padding-top: 7mm; }
.nowrap { white-space: nowrap; }

/* ── ลายเซ็นสแกนเป็นสีน้ำเงินปากกา (ไฟล์ลายเซ็นเป็น PNG พื้นโปร่งใส → เปลี่ยนเฉพาะสีหมึก) ── */
.ll-sigimg, .ab-sig, .sig-img { filter: brightness(0) saturate(100%) invert(16%) sepia(92%) saturate(3600%) hue-rotate(226deg) brightness(72%) contrast(110%); -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* ช่องติ๊ก "ใส่ลายเซ็น" ข้างปุ่มพิมพ์ */
.sig-check { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid #D8D8DC; border-radius: var(--btn-radius); background: #fff; font-size: 13.5px; cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.sig-check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.sig-check.on { border-color: var(--accent); background: var(--accent-soft-bg); color: var(--accent-soft-text); font-weight: 600; }
.print-doc .sig-check { border-color: #fff; }
.hw-src { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; margin-left: 4px; border-radius: 6px; background: #F1F2F8; color: #6E6E76; vertical-align: 1px; }

/* ── หัวเว็บแบบมีมิติ : พื้นไล่สีอ่อน · เงาซ้อนสองชั้น · ตราในกรอบขาวลอย ── */
.site-header { background: linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(246,247,255,.97) 100%); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid rgba(91,110,245,.12); box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 10px 28px -18px rgba(60,70,200,.45), 0 2px 6px -3px rgba(60,70,200,.12); }
.site-logo { background: #fff; border-radius: 14px; padding: 4px; box-shadow: 0 6px 14px -8px rgba(60,70,200,.45), 0 0 0 1px rgba(91,110,245,.12); }
.site-title { background: linear-gradient(135deg, #1E2257, #4F5FD9); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── ปุ่มโปรไฟล์ (มุมขวาบน) ── */
.me-btn { display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(91,110,245,.18); background: #fff; border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font: inherit; color: inherit; flex: none; box-shadow: 0 4px 12px -8px rgba(60,70,200,.5); transition: box-shadow .2s, transform .12s; }
.me-btn:hover { box-shadow: 0 8px 18px -10px rgba(60,70,200,.6); }
.me-btn:active { transform: scale(.96); }
.me-av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-grad); color: #fff; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(91,110,245,.35); }
.me-av-lg { width: 52px; height: 52px; font-size: 22px; }
.me-txt { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.me-txt b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.me-txt span { font-size: 11.5px; color: #6E6E76; }

/* ── แผงข้อมูลของฉัน ── */
.me-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(20,22,40,.28); animation: fadeIn .18s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.me-panel { position: fixed; z-index: 56; top: 74px; right: max(16px, calc((100vw - 1180px) / 2 + 16px)); width: 360px; max-height: calc(100vh - 96px); overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(30,30,80,.45); padding: 16px; display: flex; flex-direction: column; gap: 12px; animation: sheetUp .22s cubic-bezier(.2,.7,.2,1) both; }
.me-head { display: flex; align-items: center; gap: 12px; }
.me-x { border: none; background: #F1F2F8; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: #4B4B52; flex: none; }
.me-sec { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid #EEEEF2; padding-top: 12px; }
.me-sec-t { font-weight: 700; font-size: 14px; }
.me-note { font-size: 11.5px; color: #8A8A92; margin-top: -4px; }
.me-links { display: flex; flex-direction: column; border-top: 1px solid #EEEEF2; padding-top: 6px; }
.me-link { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border: none; background: none; font: inherit; font-size: 14px; color: #2E2E34; text-align: left; cursor: pointer; border-radius: 10px; text-decoration: none; }
.me-link:hover { background: #F5F6FC; text-decoration: none; }
.me-link svg { color: var(--accent); flex: none; }
.me-logout, .me-logout svg { color: #B22C2C; }
@media (max-width: 860px) {
  /* แอปบนมือถือ (เข้าสู่ระบบแล้ว) : ไม่มี ☰ · ใช้ไอคอนโปรไฟล์ + แถบเมนูล่าง */
  body:has(.tab-bar) .nav-toggle-btn { display: none; }
  .me-txt { display: none; }
  .me-btn { padding: 3px; }
  .site-header { border-radius: 0 0 22px 22px; }
  .site-logo { width: 40px; height: 40px; border-radius: 12px; }
  /* แผงข้อมูลของฉัน = แผ่นเลื่อนขึ้นจากด้านล่าง */
  .me-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 86vh; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .me-panel::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 3px; background: #DCDCE3; margin: -6px auto 2px; }
}
@media (max-width: 860px) {
  /* หัวเว็บมือถือ : ตรา · ชื่อเว็บ (ตัดได้ 2 บรรทัด) · ไอคอนโปรไฟล์ อยู่แถวเดียวกันเสมอ */
  body:has(.tab-bar) .site-header-inner { flex-wrap: nowrap; padding: 10px 14px; }
  body:has(.tab-bar) .site-brand { flex: 1; }
  body:has(.tab-bar) .site-header-inner > .grow { display: none; }
}

/* ── รูปครูรายคน ── */
.t-av { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; background: #E9EBF3; color: #B7BCCF; box-shadow: 0 0 0 1.5px #fff, 0 2px 6px -2px rgba(30,30,60,.25); vertical-align: middle; }
.t-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adv-cards { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid #EFEFF1; }
.adv-card { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 120px; text-align: center; }
.adv-card b { font-size: 13px; font-weight: 600; line-height: 1.3; margin-top: 4px; }
.adv-card span { font-size: 11.5px; color: #6E6E76; }
.me-av-img { padding: 0; overflow: hidden; }
.me-av-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 620px; overflow-y: auto; padding: 2px; }
.tp-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px; border: 1px solid #ECEDF3; border-radius: 12px; text-align: center; }
.tp-cell b { font-size: 12.5px; font-weight: 600; line-height: 1.3; margin-top: 4px; }
.tp-cell span { font-size: 11px; color: #8A8A92; }
.tp-acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.tp-acts .btn { padding: 4px 8px; font-size: 12px; }

/* ── แบบสำรวจสุขภาพบนมือถือ : การ์ดรายคน พอดีความกว้างจอ ── */
.hc-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.hc-card { border: 1px solid #ECEDF3; border-radius: 14px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.hc-card.fail { border-color: #F0C4C4; background: #FFFAFA; }
.hc-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hc-name b { font-size: 14.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-no { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft-bg); color: var(--accent-soft-text); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.hc-flag { margin-left: auto; font-size: 11.5px; font-weight: 600; color: #B22C2C; background: #FCF0F0; padding: 1px 8px; border-radius: 999px; flex: none; }
.hc-lv { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #FDF3D6; color: #8A5A12; border: 1px solid #EBCB7A; font-size: 11px; flex: none; }
.hc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hc-item { display: flex; flex-direction: column; gap: 4px; align-items: stretch; min-width: 0; }
.hc-lab { font-size: 12px; color: #6E6E76; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #D8D8DC; border-radius: 10px; overflow: hidden; }
.hc-seg button { border: none; background: #fff; color: #A0A0A8; font-size: 16px; font-weight: 700; padding: 7px 0; cursor: pointer; transition: background .15s, color .15s; }
.hc-seg button + button { border-left: 1px solid #D8D8DC; }
.hc-seg button.on.ok { background: #EAF3EC; color: #2C5F3A; }
.hc-seg button.on.bad { background: #FCF0F0; color: #B22C2C; }
.hc-item.lv .hc-seg button.on { background: #FDF3D6; color: #8A5A12; }
.hc-seg button:disabled { cursor: default; opacity: .7; }
.hc-note { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #E4E4E7; border-radius: 9px; }
.hc-note.lv { border-color: #EBCB7A; background: #FDF3D6; }

/* ── คู่มือครูที่ปรึกษาบนมือถือ : ทุกเมนูพอดีความกว้างจอ ── */
.bs-card { border: 1px solid #ECEDF3; border-radius: 14px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.bs-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6E6E76; }
.bs-f select { width: 100%; min-width: 0; }
.bs-auto { margin-left: auto; font-size: 11px; color: #8A5A12; background: #FDF3D6; padding: 1px 8px; border-radius: 999px; flex: none; }
.bs-sum td:last-child, .bs-sum th:last-child { width: 56px; text-align: center; }
@media (max-width: 640px) {
  .tab-panel { min-width: 0; }
  .tab-panel .card, .tab-panel .card-flat { min-width: 0; }
  .cm-row { gap: 4px !important; }
  .cm-lab { width: auto !important; font-weight: 500; }
  .cm-sel { min-width: 0 !important; flex-basis: 100% !important; width: 100%; }
  .pm-row { grid-template-columns: 1fr 1fr !important; gap: 6px 8px !important; padding-bottom: 10px; border-bottom: 1px dashed #ECEDF3; }
  .pm-row .pm-lab { grid-column: 1 / -1; font-weight: 500; }
  .pm-row select { grid-column: 1 / -1; }
}
.hb-sub-m { display: none; }
.rf-f { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.rf-f span { font-size: 11.5px; color: #8A8A92; }
@media (max-width: 640px) {
  /* คู่มือครูที่ปรึกษาบนมือถือ : เมนูย่อยเป็นดรอปดาวน์ · หัวกะทัดรัด ห้อง+เดือนแถวเดียว */
  .hb-nav { display: none !important; }
  .hb-sub-m { display: flex; gap: 4px; }
  .hb-head { padding: 14px !important; gap: 10px !important; }
  .hb-head > .grow { display: none; }
  .hb-head > .field { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .hb-head > .field select { width: 100%; min-width: 0; }
  .hb-head > .btn { flex-basis: 100%; }
  /* กิจกรรมส่งเสริม : แถวละคน = เลือกนักเรียน + ลบ / กิจกรรมเต็มบรรทัด */
  .pr-row { grid-template-columns: 26px minmax(0, 1fr) auto !important; gap: 6px 8px !important; padding-bottom: 10px; border-bottom: 1px dashed #ECEDF3; }
  .pr-row > input { grid-column: 1 / -1; grid-row: 2; }
}

/* ── มอบหมายให้ช่วยพิมพ์ (หน้าพิมพ์เอกสาร ปค.) + งานเอกสารที่ได้รับมอบหมาย ── */
.pa-box { display: flex; flex-direction: column; gap: 10px; border: 1px solid #E9E9EC; border-radius: 12px; padding: 14px; background: #FCFAFB; }
.pa-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pa-form .field { flex: 1; min-width: 200px; }
.pa-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-radius: 10px; padding: 10px 12px; background: #FFF6E5; color: #7A4B00; font-size: 13px; line-height: 1.5; }
.pa-status.done { background: #EAF3EC; color: #2C5F3A; }
.pj-tabs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pj-tabs button { border: 1px solid #D8D8DC; background: #fff; border-radius: 20px; padding: 7px 16px; font: inherit; font-size: 14px; cursor: pointer; color: #4B4B52; }
.pj-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pj-tabs select { padding: 7px 10px; border: 1px solid #D8D8DC; border-radius: 8px; background: #fff; font: inherit; font-size: 13.5px; }
.pj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.pj-card { background: #fff; border: 1px solid #ECECEF; border-left: 4px solid #E09A1A; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 2px rgba(20,20,40,.04); }
.pj-card.done { border-left-color: #2F9E5B; }
.pj-head { display: flex; gap: 10px; align-items: flex-start; }
.pj-ic { width: 34px; height: 34px; border-radius: 10px; background: #FBEFF3; color: #B4567A; display: flex; align-items: center; justify-content: center; flex: none; }
.pj-sub { font-size: 12.5px; color: #6E6E76; line-height: 1.45; }
.pj-tag { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: #FFF6E5; color: #8A5A00; white-space: nowrap; flex: none; }
.pj-card.done .pj-tag { background: #EAF3EC; color: #2C5F3A; }
.pj-meta { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #4B4B52; line-height: 1.5; }
.pj-note { color: #7A4B00; }
.pj-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .pj-list { grid-template-columns: minmax(0, 1fr); }
  .pj-actions .btn { flex: 1; }
  .pa-form .btn { width: 100%; }
  .pa-status { flex-direction: column; align-items: stretch; }
}

/* ── ติดตามการมาสายแบบรอบ ── */
.lr-view { display: inline-flex; gap: 0; border: 1px solid #D8D8DC; border-radius: 10px; overflow: hidden; align-self: flex-start; background: #fff; }
.lr-view button { border: none; background: none; padding: 7px 16px; font: inherit; font-size: 13.5px; cursor: pointer; color: #4B4B52; }
.lr-view button.on { background: #17171A; color: #fff; font-weight: 600; }
.lr-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 720px) { .lr-kinds { grid-template-columns: 1fr; } }
.lr-kinds button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1.5px solid #E2E2E6; background: #fff; border-radius: 14px; padding: 12px 16px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; color: #17171A; text-align: left; }
.lr-kinds button span { font-size: 12.5px; font-weight: 400; color: #6E6E76; }
.lr-kinds button.on { border-color: var(--accent); background: var(--accent-soft-bg); color: var(--accent-soft-text); }
.lr-rounds { display: flex; flex-direction: column; gap: 10px; }
.lr-card { background: #fff; border: 1px solid #ECECEF; border-left: 4px solid #8B5CF6; border-radius: 14px; overflow: hidden; }
.lr-card.warn { border-left-color: #E09A1A; }
.lr-head { display: flex; gap: 12px; align-items: center; width: 100%; border: none; background: none; padding: 14px 16px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.lr-head:hover { background: #FAFAFC; }
.lr-caret { font-size: 18px; color: #6E6E76; width: 16px; flex: none; }
.lr-title { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; font-size: 15px; }
.lr-sub { font-size: 12.5px; color: #6E6E76; font-weight: 400; line-height: 1.45; }
.lr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lr-chip { font-size: 12px; padding: 2px 9px; border-radius: 20px; background: #F1F1F3; color: #4B4B52; }
.lr-chip.ok { background: #EAF3EC; color: #2C5F3A; }
.lr-chip.bad { background: #FCF0F0; color: #B22C2C; }
.lr-pct { display: flex; flex-direction: column; align-items: center; flex: none; font-size: 11px; color: #8A8A92; }
.lr-pct b { font-size: 20px; color: #17171A; }
.lr-body { border-top: 1px solid #F1F1F3; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.lr-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lr-hint { font-size: 12px; color: #8A8A92; flex: 1; min-width: 200px; }
.lr-list { display: flex; flex-direction: column; }
.lr-row { display: flex; gap: 12px; align-items: center; padding: 9px 2px; border-bottom: 1px dashed #EEEEF2; }
.lr-row:last-child { border-bottom: none; }
.lr-who { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; font-size: 14px; }
.lr-room { font-size: 11.5px; color: #3D4BB8; font-weight: 600; }
.lr-ticks { display: flex; gap: 6px; flex: none; }
.lr-tick { border: 1.5px solid #D8D8DC; background: #fff; border-radius: 10px; padding: 7px 14px; font: inherit; font-size: 13.5px; cursor: pointer; color: #4B4B52; min-width: 76px; }
.lr-tick.ok.on { background: #2F9E5B; border-color: #2F9E5B; color: #fff; font-weight: 600; }
.lr-tick.bad.on { background: #D14343; border-color: #D14343; color: #fff; font-weight: 600; }
.lr-tick:disabled { opacity: .5; cursor: default; }
.lr-adv { display: flex; flex-direction: column; gap: 10px; border-color: #F0C9C0; }
.lr-adv-head { display: flex; flex-direction: column; gap: 2px; }
.lr-adv-round { border-top: 1px solid #F1F1F3; padding-top: 8px; }
.lr-adv-meet { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; }
.lr-adv-meet span { font-size: 12.5px; color: #8A8A92; }
@media (max-width: 640px) {
  .lr-kinds button { padding: 10px 12px; font-size: 14px; }
  .lr-head { padding: 12px; gap: 8px; }
  .lr-body { padding: 10px 12px 12px; }
  .lr-row { flex-wrap: wrap; }
  .lr-ticks { width: 100%; }
  .lr-tick { flex: 1; padding: 9px 10px; }
  .lr-tools .btn { flex: 1 1 100%; }
}
/* ใบลงลายมือชื่อผู้ปกครอง */
.lr-sign { background: #fff; color: #000; width: 210mm; min-height: 297mm; margin: 0 auto 20px; padding: 1.4cm 1.5cm 1.4cm 2cm; box-sizing: border-box; font-family: 'TH Sarabun New', 'Sarabun', sans-serif; font-size: 15pt; line-height: 1.2; display: flex; flex-direction: column; }
.lr-sign-head { display: flex; gap: 12px; align-items: center; margin-bottom: 4mm; position: relative; }
.lr-sign-head img { height: 2cm; width: auto; flex: none; }
.lr-sign-title { font-size: 18pt; font-weight: 700; }
.lr-sign-pg { position: absolute; right: 0; top: 0; font-size: 12pt; }
.lr-sign-tbl { width: 100%; border-collapse: collapse; font-size: 15pt; }
.lr-sign-tbl th, .lr-sign-tbl td { border: 1px solid #000; padding: 0 2mm; height: 1cm; vertical-align: middle; }
.lr-sign-tbl th { height: auto; padding: 1.5mm 2mm; font-weight: 700; background: #F1F1F3; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lr-sign-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6mm; gap: 10mm; }
@media print { .lr-sign.govdoc-sheet { padding: 1.4cm 1.5cm 1.4cm 2cm !important; min-height: 268mm !important; height: auto !important; break-inside: avoid; } }
/* เมนูติดตามการมาสาย : มือถือ */
.late-head-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.late-sub-m { display: none; }
@media (max-width: 640px) {
  .late-nav { display: none !important; }
  .late-sub-m { display: flex; gap: 4px; margin-bottom: 2px; }
  .late-head { padding: 14px !important; gap: 8px !important; }
  .late-head-btns { width: 100%; }
  .late-head-btns .sig-check { flex: 1 1 100%; justify-content: center; }
  .late-head-btns .btn { flex: 1; }
}

/* ต้องดำเนินการ : วันนัดของกลุ่มหนังสือเชิญ (แยกฝ่ายกิจการ / ผู้อำนวยการ) */
.late-meet { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 10px 18px; background: #FFF7F4; border-bottom: 1px solid #F3E1DA; }
.badge.late-dir { background: #EDE7FB; color: #4B2A8A; }

/* ใบปะหน้าแจกรายห้อง (มาสาย) — แบบเดียวกับไฟล์ที่ผู้ใช้อนุมัติ 12 พ.ย. 2569 */
.late-cover { background: #fff; color: #111; width: 210mm; min-height: 297mm; margin: 0 auto 20px; padding: 14mm 15mm 12mm 18mm; box-sizing: border-box; display: flex; flex-direction: column; font-family: 'TH Sarabun New', 'Sarabun', sans-serif; font-size: 16pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.late-cover .lc-head { display: flex; gap: 4mm; align-items: center; border-bottom: 1.5pt solid #1F2A5A; padding-bottom: 2.5mm; }
.late-cover .lc-head img { height: 17mm; width: auto; }
.late-cover .lc-t1 { font-size: 21pt; font-weight: 700; color: #1F2A5A; line-height: 1.1; }
.late-cover .lc-t2 { font-size: 14pt; color: #555; }
.late-cover .lc-roombox { display: flex; align-items: center; gap: 7mm; margin-top: 4mm; }
.late-cover .lc-room { font-size: 40pt; font-weight: 700; line-height: 1; background: #1F2A5A; color: #fff; padding: 3mm 7mm 1.5mm; border-radius: 3mm; white-space: nowrap; }
.late-cover .lc-who { font-size: 16pt; line-height: 1.35; }
.late-cover .lc-sum { display: flex; gap: 4mm; margin-top: 5mm; }
.late-cover .lc-c { flex: 1; border: 1pt solid #bbb; border-radius: 2.5mm; padding: 1.5mm 3mm; display: flex; align-items: baseline; justify-content: center; gap: 2mm; font-size: 14.5pt; white-space: nowrap; }
.late-cover .lc-c b { font-size: 26pt; line-height: 1; }
.late-cover .lc-c.lc-warn { background: #FFF6D9; border-color: #E2C266; }
.late-cover .lc-c.lc-invite { background: #FDE7E3; border-color: #E59A8C; }
.late-cover .lc-c.lc-director { background: #EDE7FB; border-color: #A796D6; }
.late-cover .lc-c.lc-t { background: #EEF1F8; border-color: #9AA6C9; }
.late-cover .lc-tbl { width: 100%; border-collapse: collapse; margin-top: 4mm; font-size: 14pt; line-height: 1.05; }
.late-cover .lc-tbl th { background: #1F2A5A; color: #fff; font-weight: 700; padding: 1.5mm; border: 0.6pt solid #1F2A5A; }
.late-cover .lc-tbl td { border: 0.6pt solid #999; padding: 0.9mm 1.5mm; text-align: center; vertical-align: middle; }
.late-cover .lc-tbl td.l { text-align: left; }
.late-cover .lc-tbl td.g { font-size: 13pt; white-space: nowrap; }
.late-cover .lc-tbl tr.lc-invite td { background: #FFF1EE; }
.late-cover .lc-tbl tr.lc-director td { background: #F4F0FD; }
.late-cover .ph { color: #555; font-size: 12.5pt; }
.late-cover .box { display: inline-block; width: 4.5mm; height: 4.5mm; border: 1pt solid #333; }
.late-cover .lc-steps { margin-top: 5mm; font-size: 15pt; line-height: 1.3; }
.late-cover .lc-st { font-weight: 700; color: #1F2A5A; }
.late-cover .lc-steps ol { margin: 1mm 0 0; padding-left: 7mm; }
.late-cover .lc-recv { margin-top: auto; display: flex; justify-content: space-between; font-size: 15pt; line-height: 1.6; padding-top: 5mm; }
.late-cover .lc-foot { margin-top: 3mm; font-size: 12.5pt; color: #666; border-top: 0.6pt solid #ccc; padding-top: 1.5mm; }
/* หน้าแจกรายห้องพิมพ์ด้วยขอบกระดาษ 0 (เหมือนหนังสือ) → ใบปะหน้ากำหนดระยะขอบเอง ทับกฎ .print-sheet { padding: 0 } */
@media print { .print-sheet.late-cover { margin: 0 !important; padding: 14mm 15mm 12mm 18mm !important; width: 210mm !important; height: 296mm; min-height: 0 !important; box-sizing: border-box; break-after: page; } }

/* ── ครูดูแลแดชบอร์ดคู่มือ (หน้าสิทธิ์ผู้ดูแล) : แถวละ 1 ครู + ชิปติ๊กด้านที่ดูแล ── */
.hbd-row { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid #ECECF0; border-radius: 10px; }
.hbd-who { display: flex; align-items: center; gap: 10px; }
.hbd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hbd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid #D8D8DC; border-radius: 999px; font-size: 13px; cursor: pointer; user-select: none; background: #fff; }
.hbd-chip input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.hbd-chip.on { border-color: var(--accent); background: var(--accent-soft-bg); color: var(--accent-soft-text); font-weight: 600; }
.hbd-chip.locked { opacity: .7; cursor: default; }
@media (max-width: 640px) { .hbd-chip { font-size: 14px; padding: 7px 12px; } .hbd-row { padding: 12px; } }

/* แถบพิมพ์รายงานรายด้านบนแดชบอร์ด */
.hbr-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hbr-bar-label { font-weight: 600; font-size: 14px; }
.hbr-bar select { flex: 0 1 280px; min-width: 0; }
@media (max-width: 640px) {
  .hbr-bar select { flex: 1 1 100%; }
  .hbr-bar .sig-check { flex: 1 1 auto; justify-content: center; }
  .hbr-bar .btn { flex: 1 1 auto; }
}

/* ── แบบพิมพ์รายงานรายด้าน (A4 แนวตั้ง ใช้ร่วมกับ .pc-sheet .govdoc-sheet) แบ่งหน้าเองในโค้ด ── */
.hbr-sheet { padding: 1.5cm 2cm 1.4cm 3cm; line-height: 1.22; }
.hbr-sheet .pc-crest { height: 2.2cm; }
.hbr-sheet .pc-title { font-size: 19pt; line-height: 1.15; }
.hbr-rule { border: none; border-top: 1.5px solid #000; margin: 2mm 0 1mm; }
.hbr-h { font-weight: 700; margin-top: 1mm; }
.hbr-h.hbr-gap { margin-top: 3mm; }
.hbr-li { padding-left: 1cm; text-align: justify; }
.hbr-run { font-size: 13pt; color: #333; border-bottom: 1px solid #000; padding-bottom: 1mm; margin-bottom: 2mm; }
.hbr-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14pt; line-height: 1.15; margin-top: 1mm; }
.hbr-tbl th, .hbr-tbl td { border: 1px solid #000; padding: 0.4mm 1.4mm; vertical-align: top; overflow-wrap: anywhere; }
.hbr-tbl th { background: #EDEDF0; font-weight: 700; font-size: 13pt; overflow-wrap: normal; text-align: center; vertical-align: middle; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hbr-tbl td.c { text-align: center; }
.hbr-tbl tr.hbr-total td { font-weight: 700; background: #F6F6F8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.hbr-tbl tr.hbr-no td:last-child { color: #B22C2C; font-weight: 700; }
.hbr-date { text-align: right; margin-top: 4mm; }
.hbr-sheet .pc-signs { margin-top: 3mm; }
.hbr-sheet .pc-signs.hbr-one { grid-template-columns: 1fr 1fr; }
.hbr-sheet .pc-signs.hbr-one > .pc-sign:first-child { grid-column: 2; }
.hbr-ack { display: flex; flex-direction: column; align-items: center; margin-top: 2mm; }
.hbr-ack > div:first-child { margin-bottom: 0; }
.hbr-foot { margin-top: auto; padding-top: 3mm; text-align: center; font-size: 12pt; color: #555; }
@media print { .hbr-sheet.pc-sheet.govdoc-sheet { min-height: 295mm !important; height: auto !important; } }

/* ช่องวันที่แบบ ISO (isoDateHtml) : แสดง วว/ดด/ปปปป แทนรูปแบบของเบราว์เซอร์ */
.date-field-wrap.iso-date { display: flex; }
.date-field-wrap.iso-date .iso-date-text { width: 100%; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .field > .date-field-wrap.iso-date { width: 100% !important; } }
