/* ═══════════════════════════════════════════════════════════════════════
   ประวัติรายบุคคล — personal_detail.php
   โรงเรียนเทศบาล ๑ กิตติขจร

   รอบ 24 ก.ย. 2569: ภาษาภาพเดียวกับ /zerodropout/ ชุดเดียวกับ css/tb1-personnel.css (ทำเนียบ)
   และ css/tb1-teacher-schedules.css หัวหน้าน้ำเงินไล่เฉดมีรูปครูกลางหน้า การ์ดตัวเลขลอยทับขอบล่าง
   ผังตารางสอนใช้คลาสและหน้าตาชุดเดียวกับหน้าตารางสอนครู (ยกมาแล้วเปลี่ยน prefix เป็น pd-)

   ★ โทเคนของหน้าทุกตัวเป็น alias ที่ชี้ไป --tb1-* โหมดมืดจึงพลิกให้เอง
   ★ สีไม่ใช่ตัวบอกเดียว: ระดับรางวัลเขียนชื่อทุกใบ กลุ่มคาบมีลายเส้นซ้ายและชื่อชนิดคาบ
   ★ ไม่มี opacity:0 เป็นสถานะพัก ที่ขยับได้มีแค่ตำแหน่ง ความยาวแถบ ขนาดรูป และเส้นแกน
   ★ ธีมกลางบังคับ font-family ของ span div li p a ด้วย !important
     ตัวเลขและชื่อที่ต้องเป็นตัวเซริฟจึงใช้ <b>
   ★ ทุก selector ขึ้นต้นด้วย pd- ไม่ชนกับหน้าอื่นหรือไฟล์กลาง
   ═══════════════════════════════════════════════════════════════════════ */

.pd {
    --pd-ink: var(--tb1-ink-1, #0f172a);
    --pd-ink-2: var(--tb1-ink-2, #334155);
    --pd-muted: var(--tb1-ink-3, #5a697f);
    --pd-page: var(--tb1-page, #f8fafc);
    --pd-paper: var(--tb1-surface, #ffffff);
    --pd-paper-alt: var(--tb1-surface-alt, #f1f5f9);
    --pd-line: var(--tb1-border, #e2e8f0);
    --pd-line-bold: var(--tb1-border-bold, #cbd5e1);
    --pd-brand: var(--tb1-brand, #1d4ed8);
    --pd-brand-soft: color-mix(in srgb, var(--tb1-brand, #1d4ed8) 10%, var(--tb1-surface, #ffffff));
    --pd-brand-line: color-mix(in srgb, var(--tb1-brand, #1d4ed8) 35%, var(--tb1-border, #e2e8f0));
    --pd-page-max: var(--tb1-page-max-width, 1440px);
    --pd-gutter: var(--tb1-shell-gutter, 20px);
    --pd-ease: cubic-bezier(.4, 0, .2, 1);
    --pd-r: 16px;
    --pd-rs: 12px;
    --pd-serif: var(--tb1-font-display, 'Noto Serif Thai', serif);
    --pd-sans: var(--tb1-font-body, 'Sarabun', sans-serif);
    --pd-shadow: 0 14px 32px -24px rgba(15, 23, 42, .55), inset 0 1px 0 rgba(255, 255, 255, .6);
    --pd-shadow-float: 0 22px 44px -26px rgba(15, 23, 42, .6), inset 0 1px 0 rgba(255, 255, 255, .6);
    --pd-hero-a: color-mix(in srgb, var(--tb1-banner-1, #1d4ed8) 60%, var(--tb1-ink-surface, #0f172a));
    --pd-hero-b: var(--tb1-banner-1, #1d4ed8);
    --pd-hero-c: color-mix(in srgb, var(--tb1-banner-1, #1d4ed8) 78%, var(--tb1-accent-strong, #0284c7));

    /* ความหมายของสี */
    --pd-neutral: color-mix(in srgb, var(--tb1-ink-3, #5a697f) 80%, var(--tb1-surface, #ffffff));
    --pd-warn: var(--tb1-warning, #f59e0b);
    --pd-warn-fg: #9a4508;
    --pd-warn-bg: color-mix(in srgb, var(--tb1-warning, #f59e0b) 14%, var(--tb1-surface, #ffffff));
    --pd-crit: var(--tb1-danger, #ef4444);
    /* ★ โทเคน text-danger ของโหมดสว่าง (#dc2626) บนพื้นแดงอ่อนได้ 4.2:1 ไม่ผ่าน AA หน้านี้จึงใช้เฉดเข้มกว่า */
    --pd-crit-fg: #b91c1c;
    --pd-crit-bg: color-mix(in srgb, var(--tb1-danger, #ef4444) 11%, var(--tb1-surface, #ffffff));
    --pd-ok: var(--tb1-success, #10b981);
    --pd-ok-fg: var(--tb1-text-success, #047857);
    --pd-ok-bg: color-mix(in srgb, var(--tb1-success, #10b981) 13%, var(--tb1-surface, #ffffff));
    --pd-info: var(--tb1-info, #0ea5e9);
    --pd-info-fg: var(--tb1-text-info, #0e7490);
    --pd-info-bg: color-mix(in srgb, var(--tb1-info, #0ea5e9) 12%, var(--tb1-surface, #ffffff));
    --pd-tip-bg: var(--tb1-ink-surface, #0f172a);
    --pd-tip-ink: #f8fafc;

    /* สี่กลุ่มของคาบ — ชุดเดียวกับ css/tb1-classroom.css (ตารางเรียนรายห้อง) สีจึงหมายถึงสิ่งเดียวกันทั้งสองหน้า
       ★ สีไม่ใช่ตัวบอกเดียว: เส้นซ้ายของคาบมีลายต่างกัน (ทึบ เส้นคู่ เส้นประ จุด) และชื่อชนิดคาบพิมพ์ในทุกช่อง */
    --pd-g-subject: var(--tb1-brand, #1d4ed8);
    --pd-g-home: var(--tb1-text-info, #0e7490);
    /* ★ โทเคน text-warning ของโหมดสว่าง (#b45309) บนพื้นอ่อนของช่องคาบได้ 4.5:1 พอดีเส้น หน้านี้จึงใช้เฉดเข้มกว่า
       (บนพื้นอ่อนทุกแบบของหน้าได้ 5.5:1 ขึ้นไป) โหมดมืดกลับไปใช้โทเคนกลาง */
    --pd-g-develop: #9a4508;
    --pd-g-work: var(--tb1-ink-3, #5a697f);
    --pd-tone: var(--pd-g-work);
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd {
    --pd-brand-soft: color-mix(in srgb, var(--tb1-brand, #60a5fa) 16%, var(--tb1-surface, #111c31));
    --pd-shadow: 0 14px 32px -22px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .055);
    --pd-shadow-float: 0 22px 44px -24px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .055);
    --pd-neutral: color-mix(in srgb, var(--tb1-ink-3, #94a3b8) 72%, var(--tb1-surface, #111c31));
    --pd-crit-fg: var(--tb1-text-danger, #fda4af);
    --pd-warn-fg: var(--tb1-text-warning, #fbbf24);
    --pd-g-develop: var(--tb1-text-warning, #fbbf24);
    --pd-tip-bg: #1b2a47;
    color-scheme: dark;
}

/* โหมดมืดสีแบรนด์เป็นฟ้าอ่อน ตัวอักษรบนพื้นแบรนด์จึงต้องเป็นสีเข้ม */
:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd :is(.pd-chip[aria-pressed="true"], .pd-nav-a[aria-current="location"]) {
    color: #0b1324;
}

/* ── เปลือกหน้า ────────────────────────────────────────────────────────
   ★ หน้านี้ไม่ได้โหลด Bootstrap แล้ว จึงต้องล้าง margin 8px ของ body เอง
   ★ หน้าที่ไม่ทาพื้น body เอง จะได้ตัวอักษรสว่างบนพื้นขาวในโหมดมืด */
body.pd-page {
    margin: 0;
    background: var(--tb1-page, #f8fafc);
    color: var(--tb1-ink-2, #334155);
}

/* ★ แถบเมนู (57px) กับแถบเครื่องมือของหน้า (sticky ทั้งคู่) ต้องไม่บังหัวข้อที่กระโดดไปถึง
   สคริปต์วัดความสูงจริงแล้วเขียน --pd-stick ให้ ไม่มีสคริปต์ใช้ค่าประมาณ */
html:has(body.pd-page) {
    scroll-padding-top: var(--pd-stick, 8.5rem);
}

main.pd {
    padding: 0 var(--pd-gutter) clamp(40px, 5vw, 72px);
    color: var(--pd-ink-2);
}

main.pd:focus {
    outline: none;
}

/* ★ ขอบเนื้อหาต้องตรงแนวกับแถบเมนู สูตรเดียวกับ .tb1-navbar-container */
.pd-wrap {
    max-width: calc(var(--pd-page-max) - 2 * var(--pd-gutter));
    margin-inline: auto;
}

.pd :where(h1, h2, h3, h4, p, ul, ol, dl, dd, dt, figure) {
    margin: 0;
}

.pd :where(ul, ol) {
    padding: 0;
    list-style: none;
}

.pd *,
.pd *::before,
.pd *::after {
    box-sizing: border-box;
}

/* ธีมรวมตั้ง display ให้ element หลายชนิด [hidden] ต้องชนะเสมอ */
.pd [hidden] {
    display: none !important;
}

.pd-icon {
    display: block;
    flex: 0 0 auto;
}

.pd .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pd :focus-visible {
    outline: 2px solid var(--pd-brand);
    outline-offset: 2px;
}

/* ★ ลิงก์ข้ามไปเนื้อหาซ่อนด้วย clip ไม่ใช่ left:-9999px ซึ่งไปโดนตัวตรวจล้นแนวนอน */
.pd-skip {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

body.pd-page a.pd-skip:focus {
    width: auto;
    height: auto;
    clip: auto;
    padding: 12px 18px;
    color: #ffffff;
    background: var(--tb1-banner-1, #1d4ed8);
    border-radius: 0 0 10px 0;
    text-decoration: underline;
}

html.tb1-contrast-high body.pd-page a.pd-skip:focus {
    color: #facc15;
    background: #000000;
    outline: 3px solid #facc15;
}

/* ═══════════════════════════════════════════════════════════════════════
   หัวหน้า
   ═══════════════════════════════════════════════════════════════════════ */

.pd-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-inline: calc(-1 * var(--pd-gutter));
    padding: clamp(34px, 5vw, 58px) var(--pd-gutter) clamp(92px, 9vw, 120px);
    color: #ffffff;
    text-align: center;
    /* ★ สีพื้นทึบอยู่ใต้ไล่เฉด ตัวตรวจคอนทราสต์อ่านค่านี้ และเป็นสีที่เห็นจริงตรงกลางหัวหน้า */
    background-color: var(--pd-hero-b);
    background-image: linear-gradient(135deg, var(--pd-hero-a) 0%, var(--pd-hero-b) 52%, var(--pd-hero-c) 100%);
}

.pd-hero.is-plain {
    padding-bottom: clamp(34px, 5vw, 58px);
}

/* แสงนวลสองดวงกับตารางเส้นบาง ตกแต่งล้วน อยู่หลังตัวอักษร */
.pd-hero::before,
.pd-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.pd-hero::before {
    background-image:
        radial-gradient(circle at 18% 40%, rgba(255, 255, 255, .09) 0%, transparent 48%),
        radial-gradient(circle at 84% 18%, rgba(255, 255, 255, .07) 0%, transparent 40%);
}

.pd-hero::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(180deg, #000000 35%, transparent);
    mask-image: linear-gradient(180deg, #000000 35%, transparent);
}

.pd-hero-in {
    max-width: 60rem;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pd-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: .88rem;
    font-weight: 500;
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.pd-hero-eyebrow .pd-icon {
    width: 17px;
    height: 17px;
}

.pd-hero-title {
    margin-top: 16px;
    font-family: var(--pd-serif);
    font-size: clamp(1.9rem, 4.6vw, 2.9rem);
    font-weight: 600;
    line-height: 1.25;
    color: #ffffff;
    text-wrap: balance;
}

.pd-hero-sub {
    margin-top: 10px;
    max-width: 46rem;
    text-wrap: balance;
    font-size: clamp(.98rem, 1.5vw, 1.08rem);
    line-height: 1.75;
    color: #e0e7ff;
}

.pd-hero-date {
    margin-top: 4px;
    font-size: .92rem;
    color: #e0e7ff;
}

/* ═══════════════════════════════════════════════════════════════════════
   การ์ดตัวเลข ลอยทับขอบล่างของหัวหน้า (ทั้งใบเป็นลิงก์ไปหมวดของมัน)
   ═══════════════════════════════════════════════════════════════════════ */

.pd-figs {
    position: relative;
    z-index: 1;
    margin-top: calc(-1 * clamp(66px, 7vw, 86px));
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(10px, 1.2vw, 16px);
}

.pd-figs > li {
    min-width: 0;
    display: flex;
}

.pd .pd-fig {
    position: relative;
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 16px 16px;
    color: var(--pd-muted);
    text-decoration: none;
    background: var(--pd-paper);
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r);
    box-shadow: var(--pd-shadow-float);
    transition: border-color .25s var(--pd-ease), box-shadow .25s var(--pd-ease);
}

.pd .pd-fig:hover {
    border-color: var(--pd-brand-line);
    box-shadow: 0 26px 48px -26px rgba(15, 23, 42, .7), inset 0 1px 0 rgba(255, 255, 255, .6);
}

.pd .pd-fig:focus-visible {
    outline-offset: 3px;
}

/* แถบสีบนขอบการ์ด เปลี่ยนสีตามสถานะ */
.pd-fig::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tb1-banner-1, #1d4ed8), var(--tb1-accent, #0ea5e9));
    transform-origin: left center;
}

.pd-fig.is-warn::before {
    background: var(--pd-warn);
}

.pd-fig.is-crit::before {
    background: var(--pd-crit);
}

.pd-fig-k {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--pd-muted);
}

.pd-fig-ic {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--tb1-banner-1, #1d4ed8), var(--tb1-accent-strong, #0284c7));
    border-radius: 11px;
}

.pd-fig.is-warn .pd-fig-ic {
    background: linear-gradient(135deg, #b45309, #d97706);
}

.pd-fig.is-crit .pd-fig-ic {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.pd-fig-v {
    margin-top: 2px;
    color: var(--pd-muted);
    font-size: .95rem;
}

.pd-fig-v b {
    font-family: var(--pd-serif);
    font-size: clamp(1.6rem, 2.3vw, 2.05rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--pd-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pd-fig.is-warn .pd-fig-v b {
    color: var(--pd-warn-fg);
}

.pd-fig.is-crit .pd-fig-v b {
    color: var(--pd-crit-fg);
}

.pd-fig-s {
    font-size: .86rem;
    line-height: 1.5;
    color: var(--pd-muted);
    overflow-wrap: anywhere;
}

.pd-fig.is-warn .pd-fig-s {
    color: var(--pd-warn-fg);
    font-weight: 600;
}

.pd-fig.is-crit .pd-fig-s {
    color: var(--pd-crit-fg);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════
   กล่องแจ้ง (ดึงข้อมูลไม่สำเร็จ · เปิดหน้าไม่ได้)
   ═══════════════════════════════════════════════════════════════════════ */

.pd-callout {
    margin-top: clamp(22px, 3vw, 32px);
    padding: 18px 22px;
    color: var(--pd-ink-2);
    background: var(--pd-paper);
    border: 1px solid var(--pd-line);
    border-left: 5px solid var(--pd-brand);
    border-radius: var(--pd-rs);
    box-shadow: var(--pd-shadow);
    line-height: 1.7;
}

.pd-callout.is-warn {
    background: var(--pd-warn-bg);
    border-color: var(--pd-warn);
}

.pd-callout-title {
    font-family: var(--pd-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-callout p {
    margin-top: 4px;
}

.pd-callout ul {
    margin-top: 8px;
    padding-left: 1.3rem;
    list-style: disc;
}

/* ═══════════════════════════════════════════════════════════════════════
   บุคคลทั่วไป / บุคลากร
   ป้าย "เฉพาะบุคลากร" ขึ้นในมุมมองบุคลากรเท่านั้น (หน้าสาธารณะไม่มีส่วนเหล่านั้นอยู่ใน HTML เลย)
   ═══════════════════════════════════════════════════════════════════════ */

.pd-lock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px 2px 8px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.5;
    color: #6d28d9;
    background: color-mix(in srgb, #7c3aed 9%, var(--pd-paper));
    border: 1px solid color-mix(in srgb, #7c3aed 35%, var(--pd-paper));
    border-radius: 999px;
    white-space: nowrap;
    vertical-align: middle;
}

.pd-lock .pd-icon {
    width: 13px;
    height: 13px;
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd .pd-lock {
    color: #c4b5fd;
}

.pd-fig-lock {
    display: inline-flex;
    vertical-align: -2px;
    margin-left: 6px;
    color: #6d28d9;
}

.pd-fig-lock .pd-icon {
    width: 14px;
    height: 14px;
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd .pd-fig-lock {
    color: #c4b5fd;
}

.pd-audience {
    margin-top: clamp(18px, 2.4vw, 26px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 16px;
    font-size: .92rem;
    line-height: 1.6;
    color: var(--pd-ink-2);
    background: color-mix(in srgb, #7c3aed 6%, var(--pd-paper));
    border: 1px solid color-mix(in srgb, #7c3aed 28%, var(--pd-line));
    border-radius: var(--pd-rs);
}

.pd-audience.is-preview {
    background: var(--pd-brand-soft);
    border-color: var(--pd-brand-line);
}

.pd-audience p {
    flex: 1 1 18rem;
    min-width: 0;
}

.pd-audience b {
    color: var(--pd-ink);
}

.pd-audience-ic {
    width: 34px;
    height: 34px;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    color: #6d28d9;
    background: var(--pd-paper);
    border-radius: 10px;
}

.pd-audience.is-preview .pd-audience-ic {
    color: var(--pd-brand);
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd .pd-audience-ic {
    color: #c4b5fd;
}

.pd .pd-audience .pd-btn {
    text-decoration: none;
}

.pd .pd-link {
    color: var(--pd-brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pd .pd-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
}

.pd-login .pd-icon {
    width: 18px;
    height: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════
   แถบเครื่องมือ ติดใต้แถบเมนูตอนเลื่อน
   ═══════════════════════════════════════════════════════════════════════ */

.pd-tools {
    position: sticky;
    top: var(--pd-nav-h, 57px);
    z-index: 20;
    margin-top: clamp(22px, 3vw, 34px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 8px 10px;
    background: color-mix(in srgb, var(--pd-paper) 90%, transparent);
    border: 1px solid var(--pd-line);
    border-radius: 999px;
    box-shadow: var(--pd-shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.pd-nav {
    min-width: 0;
    flex: 1 1 auto;
}

.pd-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pd .pd-nav-a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 14px;
    font-size: .92rem;
    font-weight: 500;
    color: var(--pd-ink-2);
    text-decoration: none;
    border-radius: 999px;
    white-space: nowrap;
    transition: background-color .2s var(--pd-ease), color .2s var(--pd-ease);
}

.pd .pd-nav-a:hover {
    color: var(--pd-brand);
    background: var(--pd-brand-soft);
}

.pd .pd-nav-a[aria-current="location"] {
    color: #ffffff;
    background: var(--pd-brand);
}

.pd-nav-n {
    min-width: 22px;
    padding: 0 7px;
    font-size: .8rem;
    line-height: 20px;
    text-align: center;
    color: #ffffff;
    background: #b45309;
    border-radius: 999px;
}

.pd-tools-act {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-left: auto;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 16px;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--pd-ink-2);
    background: var(--pd-paper);
    border: 1px solid var(--pd-line-bold);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color .2s, color .2s, background-color .2s;
}

.pd-btn:hover {
    color: var(--pd-brand);
    border-color: var(--pd-brand);
}

.pd-btn .pd-icon {
    width: 18px;
    height: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════
   หมวดและแผง
   ═══════════════════════════════════════════════════════════════════════ */

.pd-sec {
    margin-top: clamp(34px, 4.4vw, 56px);
}

.pd-sec-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pd-line);
}

/* หัวเรื่องมีขีดสีนำ แบบหัวเรื่องย่อยของ zerodropout */
.pd-sec-title {
    position: relative;
    padding-left: 16px;
    font-family: var(--pd-serif);
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    font-weight: 600;
    line-height: 1.4;
    color: var(--pd-ink);
    text-wrap: balance;
}

.pd-sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .2em;
    bottom: .2em;
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--tb1-banner-1, #1d4ed8), var(--tb1-accent, #0ea5e9));
    transform-origin: center top;
}

.pd-sec-count {
    padding: 3px 12px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--pd-brand);
    background: var(--pd-brand-soft);
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

.pd-sec-note {
    margin-top: 12px;
    font-size: .92rem;
    line-height: 1.6;
    color: var(--pd-muted);
}

.pd-grid-2 {
    margin-top: 18px;
    display: grid;
    gap: clamp(12px, 1.4vw, 18px);
    align-items: start;
}

.pd-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pd-panel {
    min-width: 0;
    background: var(--pd-paper);
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r);
    box-shadow: var(--pd-shadow);
    overflow: hidden;
}

.pd-sec > .pd-panel {
    margin-top: 18px;
}

.pd-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--pd-line);
    background: linear-gradient(180deg, var(--pd-paper-alt), var(--pd-paper));
}

.pd-panel-ic {
    width: 34px;
    height: 34px;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    color: var(--pd-brand);
    background: var(--pd-brand-soft);
    border-radius: 10px;
}

.pd-panel-ic .pd-icon {
    width: 18px;
    height: 18px;
}

.pd-panel-title {
    font-family: var(--pd-serif);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--pd-ink);
}

.pd-panel-note {
    margin-left: auto;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--pd-muted);
}

.pd-panel-body {
    position: relative;
    padding: 16px 20px 18px;
}

.pd-note {
    margin-bottom: 14px;
    max-width: 72ch;
    font-size: .88rem;
    line-height: 1.65;
    color: var(--pd-muted);
}

.pd-empty {
    padding: 18px 0;
    font-size: .92rem;
    color: var(--pd-muted);
}

.pd-foot-note {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--pd-line-bold);
    font-size: .84rem;
    line-height: 1.6;
    color: var(--pd-muted);
}



.pd-bars {
    display: flex;
    flex-direction: column;
}

.pd-row {
    display: grid;
    grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--pd-line);
    transition: opacity .25s, filter .25s;
}

.pd-row:first-child {
    border-top: 0;
}

.pd-bars.is-wide .pd-row {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) minmax(0, 13rem);
}

.pd-row-n {
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--pd-ink);
    overflow-wrap: anywhere;
}

.pd-track {
    position: relative;
    display: block;
    height: 14px;
    background: var(--pd-paper-alt);
    border-radius: 4px;
    overflow: hidden;
}

.pd-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w);
    background: var(--pd-neutral);
    border-radius: 4px;
    transform-origin: left center;
}

.pd-bar.is-warn {
    background: var(--pd-warn);
}

.pd-bar.is-ok {
    background: var(--pd-ok);
}

.pd-row-v {
    font-size: .86rem;
    color: var(--pd-muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pd-row-v b {
    font-weight: 700;
    color: var(--pd-ink);
}

.pd-row.is-flag .pd-row-v b {
    color: var(--pd-warn-fg);
}

.pd-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--pd-line);
    font-size: .84rem;
    color: var(--pd-muted);
}

.pd-legend b {
    color: var(--pd-ink);
    font-variant-numeric: tabular-nums;
}

.pd-legend-end {
    margin-left: auto;
}




.pd-about {
    margin-top: clamp(28px, 3.4vw, 40px);
    padding: 18px 22px;
    background: var(--pd-paper-alt);
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r);
}

.pd-about-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--pd-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-about-title .pd-icon {
    color: var(--pd-brand);
}

.pd-about-list {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 28px;
}

.pd-about-list li {
    font-size: .88rem;
    line-height: 1.65;
    color: var(--pd-muted);
}

.pd-about-list b {
    color: var(--pd-ink);
}

.pd-about-meta {
    margin-top: 12px;
    font-size: .82rem;
    color: var(--pd-muted);
}


.pd-tip {
    position: absolute;
    z-index: 30;
    max-width: 16rem;
    padding: 7px 11px;
    font-size: .84rem;
    line-height: 1.45;
    color: var(--pd-tip-ink);
    background: var(--pd-tip-bg);
    border-radius: 7px;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5);
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 10px));
}

.pd-tip b {
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}


.pd .is-subject { --pd-tone: var(--pd-g-subject); }
.pd .is-home    { --pd-tone: var(--pd-g-home); }
.pd .is-develop { --pd-tone: var(--pd-g-develop); }

/* การ์ดตัวเลขห้าหรือหกใบ */
.pd-figs.is-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pd-fig-v small {
    font-size: .9rem;
}

/* แถบซ้อนสี่กลุ่ม */
.pd-stack {
    display: flex;
    gap: 2px;
    height: 16px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--pd-paper-alt);
}

.pd-seg {
    min-width: 4px;
    background: var(--pd-tone);
    transform-origin: left center;
}

.pd-legend.is-tight {
    margin-top: 10px;
    padding-top: 0;
    border-top: 0;
    gap: 6px 16px;
}

.pd-sw {
    display: inline-block;
    width: 18px;
    height: 10px;
    margin-right: 7px;
    vertical-align: 0;
    background: var(--pd-tone);
    border-radius: 3px;
}

.pd-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(3.6rem, 1fr));
    gap: 6px;
}

.pd-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px 7px;
    text-align: center;
    background: var(--pd-paper-alt);
    border: 1px solid var(--pd-line);
    border-radius: 10px;
}

.pd-day-n {
    font-size: .82rem;
    color: var(--pd-muted);
}

.pd-day b {
    font-family: var(--pd-serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--pd-ink);
    font-variant-numeric: tabular-nums;
}

.pd-day-u {
    font-size: .76rem;
    color: var(--pd-muted);
}

.pd-day.is-off b {
    color: var(--pd-muted);
}

/* วันนี้: ทำเครื่องหมายด้วยรูปทรง (กรอบหนาและคำว่า "วันนี้") ไม่ใช่สี เพราะสีบอกกลุ่มคาบไปแล้ว */
.pd-day.is-today {
    border: 2px solid var(--pd-brand);
    background: var(--pd-brand-soft);
}

.pd-today {
    display: inline-block;
    margin-top: 3px;
    padding: 0 8px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.6;
    color: #ffffff;
    background: var(--pd-brand);
    border-radius: 999px;
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd :is(.pd-today, .pd-today) {
    color: #0b1324;
}

.pd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pd-chips li {
    padding: 2px 11px;
    font-size: .86rem;
    font-weight: 600;
    color: var(--pd-ink-2);
    background: var(--pd-paper-alt);
    border: 1px solid var(--pd-line);
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════
   ผังตารางรายสัปดาห์
   ═══════════════════════════════════════════════════════════════════════ */

.pd-grid-panel {
    margin-top: 16px;
}

.pd-grid-wrap {
    position: relative;
}

/* ★ .sr-only ในตารางต้องมีบรรพบุรุษที่ position ไม่ใช่ static ไม่งั้นหน้าเลื่อนแนวนอนได้ที่จอแคบ */
.pd-grid-scroll {
    position: relative;
    overflow-x: auto;
    border: 1px solid var(--pd-line);
    border-radius: 12px;
}

.pd-grid {
    width: 100%;
    /* ช่องคาบกว้างอย่างน้อยราว 100px ปุ่มเปิดเช็คชื่อและรหัสวิชาจึงไม่ถูกตัด จอที่แคบกว่านี้เลื่อนด้านข้างในกรอบ */
    min-width: 1180px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .86rem;
}

.pd-grid th,
.pd-grid td {
    position: relative;
    border-right: 1px solid var(--pd-line);
    border-bottom: 1px solid var(--pd-line);
}

.pd-grid tr > :last-child {
    border-right: 0;
}

.pd-grid tbody tr:last-child > * {
    border-bottom: 0;
}

.pd-g-corner {
    width: 104px;
}

.pd-grid thead th {
    padding: 8px 6px;
    text-align: center;
    vertical-align: bottom;
    background: var(--pd-paper-alt);
}

.pd-g-h.is-break {
    width: 38px;
    padding-inline: 2px;
}

.pd-g-p {
    display: block;
    font-weight: 700;
    color: var(--pd-ink);
}

.pd-g-t {
    display: block;
    margin-top: 2px;
    font-size: .76rem;
    font-weight: 400;
    color: var(--pd-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ช่วงพักแคบ เวลาเรียงลงแนวตั้ง */
.pd-g-h.is-break .pd-g-t {
    white-space: normal;
    line-height: 1.25;
}

.pd-g-h.is-break .pd-g-dash {
    display: block;
}

.pd-g-corner,
.pd-g-day {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--pd-paper-alt);
}

.pd-g-day {
    padding: 10px 10px 10px 14px;
    text-align: left;
    vertical-align: top;
    font-weight: 400;
}

.pd-g-dn {
    display: block;
    font-family: var(--pd-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-g-dc {
    display: block;
    font-size: .78rem;
    color: var(--pd-muted);
}

.pd-g-row.is-today .pd-g-day {
    box-shadow: inset 5px 0 0 var(--pd-brand);
    background: var(--pd-brand-soft);
}

.pd-g-row.is-today td {
    background: color-mix(in srgb, var(--pd-brand) 3%, var(--pd-paper));
}

.pd-g-c {
    padding: 5px;
    vertical-align: top;
    background: var(--pd-paper);
}

.pd-g-c.is-empty.is-break,
.pd-g-c.is-empty:where(.is-break) {
    background:
        repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--pd-line-bold) 55%, transparent) 6px 7px),
        var(--pd-paper-alt);
}

/* ★ คาบซ้อนกัน: ทำเครื่องหมายที่ขอบบนของช่อง ไม่ลงพื้นทั้งช่อง ตัวอักษรในช่องจึงยังอ่านออกเท่าเดิม */
.pd-g-c.is-multi {
    box-shadow: inset 0 3px 0 var(--pd-warn);
}

.pd-g-multi {
    margin: 0 0 4px;
    font-size: .74rem;
    font-weight: 700;
    color: var(--pd-warn-fg);
}

/* คาบหนึ่งใบ: พื้นอ่อนตามกลุ่ม เส้นซ้ายสีและลายตามกลุ่ม */
.pd-blk {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1px;
    height: 100%;
    padding: 6px 8px 7px 10px;
    background: color-mix(in srgb, var(--pd-tone) 8%, var(--pd-paper));
    border-left: 4px solid var(--pd-tone);
    border-radius: 3px 8px 8px 3px;
    overflow-wrap: anywhere;
}

.pd-blk.is-home {
    border-left: 5px double var(--pd-tone);
}

.pd-blk.is-develop {
    border-left-style: dashed;
}

.pd-blk.is-work {
    border-left-style: dotted;
}

.pd-blk + .pd-blk {
    margin-top: 5px;
}

.pd-g-c.is-multi .pd-blk + .pd-blk {
    margin-top: 6px;
    outline: 1px dashed var(--pd-line-bold);
    outline-offset: 2px;
}

.pd-blk-t {
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--pd-ink);
}

.pd-blk-m {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    font-size: .78rem;
    color: var(--pd-ink-2);
    font-variant-numeric: tabular-nums;
}

.pd-blk-cl {
    font-weight: 700;
}

.pd-blk-k {
    font-size: .76rem;
    font-weight: 600;
    color: var(--pd-tone);
}

.pd-off {
    display: block;
    font-weight: 400;
    color: var(--pd-muted);
}

.pd-blk-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .74rem;
    color: var(--pd-ink-2);
    font-variant-numeric: tabular-nums;
}

.pd-blk-time .pd-icon {
    width: 12px;
    height: 12px;
}

.pd-flag {
    margin-top: 2px;
    font-size: .74rem;
    font-weight: 700;
    color: var(--pd-warn-fg);
}

.pd .pd-act {
    align-self: flex-start;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    margin-top: 4px;
    padding: 2px 10px 2px 7px;
    font-size: .76rem;
    font-weight: 700;
    color: var(--pd-brand);
    text-decoration: none;
    background: var(--pd-paper);
    border: 1px solid var(--pd-brand-line);
    border-radius: 999px;
}

.pd .pd-act:hover {
    background: var(--pd-brand-soft);
    border-color: var(--pd-brand);
}

.pd-act .pd-icon {
    width: 13px;
    height: 13px;
}

/* รายการรายวัน แสดงแทนผังตารางบนจอแคบ */
.pd-agenda {
    display: none;
}

.pd-ag-day + .pd-ag-day {
    margin-top: 14px;
}

.pd-ag-h {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 6px 0 6px 12px;
    font-family: var(--pd-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--pd-ink);
    border-left: 4px solid var(--pd-line-bold);
}

.pd-ag-day.is-today .pd-ag-h {
    border-left-color: var(--pd-brand);
}

.pd-ag-h .pd-today {
    margin-top: 0;
    font-family: var(--pd-sans);
}

.pd-ag-n {
    margin-left: auto;
    font-family: var(--pd-sans);
    font-size: .82rem;
    font-weight: 400;
    color: var(--pd-muted);
}

.pd-ag-list {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pd-ag-item {
    display: grid;
    grid-template-columns: 5.6rem minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.pd-ag-time {
    display: flex;
    flex-direction: column;
    padding-top: 6px;
    font-size: .8rem;
    color: var(--pd-muted);
    font-variant-numeric: tabular-nums;
}

.pd-ag-time b {
    font-size: .86rem;
    color: var(--pd-ink);
}

.pd-empty-card {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: clamp(24px, 4vw, 40px) 20px;
    text-align: center;
    background: var(--pd-paper);
    border: 1px dashed var(--pd-line-bold);
    border-radius: var(--pd-r);
}

.pd-empty-card.is-warn {
    background: var(--pd-warn-bg);
    border-color: var(--pd-warn);
}

.pd-empty-ic {
    color: var(--pd-brand);
}

.pd-empty-card.is-warn .pd-empty-ic {
    color: var(--pd-warn-fg);
}

.pd-empty-ic .pd-icon {
    width: 32px;
    height: 32px;
}

.pd-empty-t {
    font-family: var(--pd-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-empty-s {
    max-width: 40rem;
    font-size: .92rem;
    color: var(--pd-muted);
}

.pd .pd-empty-card .pd-btn {
    text-decoration: none;
}

.pd-find {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-find-in {
    position: relative;
    display: flex;
    align-items: center;
}

.pd-find-in .pd-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--pd-muted);
    pointer-events: none;
}

.pd .pd-find input {
    width: min(18rem, 60vw);
    min-height: 40px;
    padding: 6px 14px 6px 38px;
    font: inherit;
    font-size: .92rem;
    color: var(--pd-ink);
    background: var(--pd-paper);
    border: 1px solid var(--pd-line-bold);
    border-radius: 999px;
}

.pd .pd-find input:focus-visible {
    border-color: var(--pd-brand);
}

.pd-kbd {
    display: inline-flex;
    gap: 3px;
    font-size: .76rem;
    color: var(--pd-muted);
}

.pd-kbd kbd {
    padding: 1px 6px;
    font-family: inherit;
    font-size: .76rem;
    color: var(--pd-ink-2);
    background: var(--pd-paper-alt);
    border: 1px solid var(--pd-line-bold);
    border-radius: 5px;
}
/* ═══════════════════════════════════════════════════════════════════════
   หัวหน้าแบบโปรไฟล์: เส้นทางหน้า รูปกลางหน้า ชื่อ ตำแหน่ง ป้าย
   ═══════════════════════════════════════════════════════════════════════ */

.pd-crumb {
    align-self: stretch;
    margin-bottom: clamp(14px, 2vw, 22px);
}

.pd-crumb ol {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 8px;
    font-size: .86rem;
    color: #dbeafe;
}

.pd-crumb li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pd-crumb li + li::before {
    content: "/";
    color: rgba(255, 255, 255, .55);
}

.pd .pd-crumb a {
    display: inline-block;
    min-height: 24px;
    padding: 2px 0;
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .45);
    text-underline-offset: 3px;
}

.pd .pd-crumb a:hover {
    text-decoration-color: #ffffff;
}

.pd-crumb [aria-current] {
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* รูปครู: วงขาวสองชั้นกับแสงนวล หัวหน้ากลุ่มได้วงสีทอง */
.pd-face {
    position: relative;
    margin: 0 0 16px;
    width: 148px;
    height: 148px;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, .9), 0 0 0 11px rgba(255, 255, 255, .16), 0 24px 44px -18px rgba(2, 6, 23, .75);
}

.pd-face.is-head {
    box-shadow: 0 0 0 5px #fde68a, 0 0 0 11px rgba(253, 230, 138, .22), 0 24px 44px -18px rgba(2, 6, 23, .75);
}

.pd-face-img,
.pd-face-ini {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.pd-face-img {
    object-fit: cover;
    object-position: center top;
    background: #e2e8f0;
}

.pd-face-ini {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff, #bfdbfe);
}

.pd-face-ini b {
    font-family: var(--pd-serif);
    font-size: 3.6rem;
    font-weight: 600;
    line-height: 1;
    color: #1e3a8a;
}

.pd-hero .pd-hero-title {
    margin-top: 12px;
    font-size: clamp(1.8rem, 4.2vw, 2.7rem);
}

/* ชื่อกับนามสกุลเป็นสองก้อน ตัดบรรทัดระหว่างชื่อกับนามสกุล ไม่ตัดกลางนามสกุล */
.pd-nm {
    display: inline-block;
    font-weight: inherit;
}

.pd-hero-role {
    margin-top: 6px;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    font-weight: 500;
    color: #e0e7ff;
}

.pd-hero-chips {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pd-hero-chips li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    font-size: .88rem;
    font-weight: 500;
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
}

.pd-hero-chips .pd-icon {
    width: 16px;
    height: 16px;
}

.pd-hero-chips li.is-staff {
    background: rgba(76, 29, 149, .45);
    border-color: rgba(196, 181, 253, .55);
}

.pd-lockdot {
    display: inline-flex;
    vertical-align: -2px;
    margin-left: 6px;
    color: #6d28d9;
}

.pd-lockdot .pd-icon {
    width: 14px;
    height: 14px;
}

.pd-hero .pd-lockdot {
    margin-left: 0;
    color: #ddd6fe;
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd .pd-lockdot {
    color: #c4b5fd;
}

/* ── ข้อมูลตัวตนเป็นก้อนเดียว (จอแคบเรียงกลาง จอกว้างชิดซ้ายข้างรูป) ── */
.pd-hero-id {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   การ์ดภาพรวมการสอนบนหัวหน้า (วิชาที่สอน กลุ่มเรียน ตารางของวันนี้)
   ★ พื้นการ์ดเป็นกระจกสีเข้ม ไม่ใช่ขาวโปร่ง: ขาวซ้อนขาวสองชั้นทำให้ตัวอักษรขาวต่ำกว่า 4.5:1
   ═══════════════════════════════════════════════════════════════════════ */

.pd-glance {
    align-self: stretch;
    width: 100%;
    max-width: 34rem;
    margin: 22px auto 0;
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    text-align: left;
    color: #e0e7ff;
    background: rgba(2, 6, 23, .3);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 18px;
    box-shadow: 0 24px 48px -30px rgba(2, 6, 23, .8), inset 0 1px 0 rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.pd-glance-h {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    font-size: .88rem;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.pd-glance-h .pd-icon {
    width: 17px;
    height: 17px;
}

.pd-glance-row {
    min-width: 0;
}

.pd-glance-k {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    font-size: .8rem;
    color: #dbeafe;
}

.pd-glance-k b {
    min-width: 22px;
    padding: 0 7px;
    font-size: .76rem;
    line-height: 19px;
    text-align: center;
    color: #ffffff;
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

.pd-glance-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pd-glance-chips li {
    max-width: 100%;
    padding: 3px 10px;
    font-size: .82rem;
    line-height: 1.45;
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.pd-glance-chips b {
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.pd-glance-chips.is-class li {
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

.pd-glance-chips li.is-more {
    color: #dbeafe;
    background: transparent;
    border-style: dashed;
}

.pd .pd-glance-today {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px 8px 14px;
    font-size: .88rem;
    line-height: 1.45;
    color: #ffffff;
    text-decoration: none;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    transition: border-color .2s var(--pd-ease), background-color .2s var(--pd-ease);
}

.pd .pd-glance-today:hover {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .6);
}

.pd-nw {
    white-space: nowrap;
}

.pd-glance-today b {
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.pd-glance-today > .pd-icon {
    flex: none;
    width: 18px;
    height: 18px;
    margin-left: auto;
}

/* จุดสถานะ: เขียว = วันนี้ในตารางมีคาบ · เทา = ไม่มี (คำบอกครบในข้อความอยู่แล้ว) */
.pd-glance-dot {
    flex: none;
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .25);
}

.pd-glance-dot.is-off {
    background: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(203, 213, 225, .2);
}

/* ── จอกลางขึ้นไป: รูปซ้าย ชื่อชิดซ้าย เต็มความกว้างหัวหน้า ── */
@media (min-width: 760px) {
    .pd-hero-in {
        max-width: none;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas: "crumb crumb" "face id";
        column-gap: clamp(24px, 3vw, 44px);
        align-items: center;
        text-align: left;
    }

    /* ไม่มีการ์ดภาพรวม: รูปกับชื่อเป็นก้อนเดียวกลางหัวหน้า */
    .pd-hero-in:not(.has-glance) {
        grid-template-columns: auto minmax(0, max-content);
        justify-content: center;
    }

    .pd-crumb {
        grid-area: crumb;
    }

    .pd-crumb ol {
        justify-content: flex-start;
    }

    .pd-face {
        grid-area: face;
        margin: 0;
    }

    .pd-hero-id {
        grid-area: id;
        align-items: flex-start;
    }

    .pd-hero .pd-hero-title {
        margin-top: 10px;
    }

    .pd-hero-chips {
        justify-content: flex-start;
    }

    .pd-glance {
        grid-area: glance;
        max-width: none;
        margin: 0;
    }
}

/* จอกลาง: การ์ดภาพรวมเต็มแถวล่าง วิชากับกลุ่มเรียนวางคู่กัน */
@media (min-width: 760px) and (max-width: 1099.98px) {
    .pd-hero-in.has-glance {
        grid-template-areas: "crumb crumb" "face id" "glance glance";
        row-gap: 24px;
    }

    .pd-glance {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 22px;
    }

    .pd-glance-h,
    .pd .pd-glance-today {
        grid-column: 1 / -1;
    }
}

/* จอกว้าง: สามคอลัมน์ รูป | ชื่อ | การ์ดภาพรวม */
@media (min-width: 1100px) {
    .pd-hero-in.has-glance {
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr);
        grid-template-areas: "crumb crumb crumb" "face id glance";
    }

    .pd-face {
        width: 176px;
        height: 176px;
    }

    .pd-face-ini b {
        font-size: 4.2rem;
    }
}

/* การ์ดตัวเลข: จำนวนใบเปลี่ยนตามข้อมูลของคนคนนั้น (2 ถึง 5 ใบ) */
.pd-figs.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 44rem; margin-inline: auto; }
.pd-figs.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 66rem; margin-inline: auto; }
.pd-figs.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.pd-fig-v.is-text b {
    font-size: clamp(1.25rem, 1.8vw, 1.55rem);
    white-space: normal;
}

.pd-fig-v.is-muted b {
    color: var(--pd-muted);
}

.pd-fig-label {
    display: inline-flex;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   ลิงก์จัดการ (เจ้าของประวัติและผู้ดูแล) · ลิงก์ท้ายหัวหมวด
   ═══════════════════════════════════════════════════════════════════════ */

.pd .pd-manage,
.pd .pd-sec-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 5px 14px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--pd-brand);
    text-decoration: none;
    background: var(--pd-brand-soft);
    border: 1px solid var(--pd-brand-line);
    border-radius: 999px;
}

.pd .pd-manage:hover,
.pd .pd-sec-link:hover {
    border-color: var(--pd-brand);
}

.pd-manage .pd-icon,
.pd-sec-link .pd-icon {
    width: 16px;
    height: 16px;
}

.pd .pd-btn {
    text-decoration: none;
}

.pd-copy-msg {
    flex-basis: 100%;
    padding: 0 8px 2px;
    font-size: .86rem;
    font-weight: 600;
    color: var(--pd-ok-fg);
}

/* ═══════════════════════════════════════════════════════════════════════
   ตารางสอน: สรุปบนตาราง
   ═══════════════════════════════════════════════════════════════════════ */

.pd-sched-sum {
    margin-top: 18px;
    padding: clamp(16px, 2.2vw, 22px);
    background: var(--pd-paper);
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r);
    box-shadow: var(--pd-shadow);
}

.pd-minis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pd-mini {
    padding: 10px 14px;
    background: var(--pd-paper-alt);
    border-left: 4px solid var(--pd-brand);
    border-radius: 0 10px 10px 0;
}

.pd-mini-v {
    display: block;
    font-size: .88rem;
    color: var(--pd-muted);
}

.pd-mini-v b {
    font-family: var(--pd-serif);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--pd-ink);
    font-variant-numeric: tabular-nums;
}

.pd-mini-l {
    display: block;
    font-size: .86rem;
    color: var(--pd-muted);
}

.pd-sched-foot {
    margin-top: 16px;
    padding-top: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 16px 28px;
    border-top: 1px dashed var(--pd-line-bold);
}

.pd-sched-classes {
    grid-column: 1 / -1;
}

.pd-sub-t {
    margin-bottom: 8px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--pd-ink-2);
}

.pd-sub-t span {
    font-weight: 400;
    color: var(--pd-muted);
}

.pd-grid-panel {
    margin-top: 16px;
}

.pd-empty-card > .pd-icon {
    width: 32px;
    height: 32px;
    color: var(--pd-brand);
}

/* ═══════════════════════════════════════════════════════════════════════
   ห้องที่ปรึกษา
   ═══════════════════════════════════════════════════════════════════════ */

.pd-rooms {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.2vw, 14px);
}

/* แถบกว้างหนึ่งแถบต่อห้อง: ชื่อห้อง | ตัวเลข | ครูที่ปรึกษาร่วม | ลิงก์ ทุกช่องหลังช่องแรกมีสันซ้าย */
.pd-room {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 20rem) minmax(0, 1fr) auto;
    align-items: center;
    padding: 18px 22px 18px 24px;
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--pd-g-home) 9%, transparent) 0%, transparent 45%),
        var(--pd-paper);
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r);
    box-shadow: var(--pd-shadow);
}

.pd-room::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--pd-g-home), var(--tb1-accent, #0ea5e9));
    transform-origin: center top;
}

.pd-room > * {
    min-width: 0;
}

.pd-room > * + * {
    align-self: stretch;
    display: flex;
    align-items: center;
    padding-left: 24px;
    margin-left: 24px;
    border-left: 1px solid var(--pd-line);
}

.pd-room-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pd-room-ic {
    flex: none;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--tb1-text-info, #0e7490), var(--tb1-accent-strong, #0284c7));
    border-radius: 15px;
}

.pd-room-ic .pd-icon {
    width: 26px;
    height: 26px;
}

.pd-room-main p {
    display: flex;
    flex-direction: column;
}

.pd-room-k {
    font-size: .84rem;
    font-weight: 600;
    color: var(--pd-muted);
}

.pd-room-v {
    font-family: var(--pd-serif);
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--pd-ink);
    font-variant-numeric: tabular-nums;
}

.pd-room-facts {
    gap: 10px 28px;
    flex-wrap: wrap;
    margin: 0;
}

.pd-room-facts dt {
    font-size: .84rem;
    font-weight: 600;
    color: var(--pd-muted);
}

.pd-room-facts dd {
    margin: 0;
    font-size: .92rem;
    color: var(--pd-ink-2);
}

.pd-room-facts dd b {
    font-family: var(--pd-serif);
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--pd-ink);
    font-variant-numeric: tabular-nums;
}

.pd-room-facts .pd-room-types {
    font-size: .8rem;
    color: var(--pd-muted);
}

.pd .pd-room .pd-room-with {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.pd-room-with ul {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.pd .pd-peer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd a.pd-peer span {
    text-decoration: underline;
    text-decoration-color: var(--pd-brand-line);
    text-underline-offset: 3px;
}

.pd a.pd-peer:hover span {
    color: var(--pd-brand);
    text-decoration-color: currentColor;
}

.pd-peer-img,
.pd-peer-ini {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--pd-paper), 0 0 0 3px var(--pd-line-bold);
}

.pd-peer-img {
    object-fit: cover;
    object-position: center top;
    background: var(--pd-paper-alt);
}

.pd-peer-ini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pd-brand-soft);
}

.pd-peer-ini b {
    font-family: var(--pd-serif);
    font-size: 1rem;
    color: var(--pd-brand);
}

.pd-room-none {
    margin-top: 4px;
    font-size: .92rem;
    color: var(--pd-ink-2);
}

.pd .pd-room-go {
    gap: 6px;
    min-height: 40px;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--pd-brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pd-room-go .pd-icon {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════
   ประวัติการศึกษา: เส้นเวลาจากวุฒิสูงสุดลงมา
   ═══════════════════════════════════════════════════════════════════════ */

.pd-edu {
    position: relative;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 58px;
}

/* เส้นแกนต่อจุดทุกจุด */
.pd-edu::before {
    content: "";
    position: absolute;
    top: 22px;
    bottom: 22px;
    left: 21px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--pd-brand), var(--pd-line-bold));
    transform-origin: center top;
}

.pd-edu-i {
    position: relative;
}

.pd-edu-dot {
    position: absolute;
    top: 14px;
    left: -58px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pd-brand);
    background: var(--pd-paper);
    border: 2px solid var(--pd-brand-line);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--tb1-page, #f8fafc);
}

.pd-edu-i.is-top .pd-edu-dot {
    color: #ffffff;
    background: linear-gradient(135deg, var(--tb1-banner-1, #1d4ed8), var(--tb1-accent-strong, #0284c7));
    border-color: transparent;
}

.pd-edu-dot .pd-icon {
    width: 20px;
    height: 20px;
}

.pd-edu-card {
    padding: 16px 20px;
    background: var(--pd-paper);
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r);
    box-shadow: var(--pd-shadow);
}

.pd-edu-i.is-top .pd-edu-card {
    border-color: var(--pd-brand-line);
    background:
        radial-gradient(circle at 100% 0%, var(--pd-brand-soft) 0%, transparent 55%),
        var(--pd-paper);
}

.pd-edu-lv {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
}

.pd-edu-lv b {
    font-family: var(--pd-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-edu-lv [lang="en"] {
    font-size: .86rem;
    color: var(--pd-muted);
}

.pd-edu-top {
    padding: 1px 10px;
    font-size: .76rem;
    font-weight: 700;
    color: var(--pd-brand);
    background: var(--pd-brand-soft);
    border-radius: 999px;
}

.pd-edu-ins {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .98rem;
    font-weight: 500;
    color: var(--pd-ink-2);
}

.pd-edu-ins .pd-icon {
    width: 18px;
    height: 18px;
    color: var(--pd-muted);
}

.pd-edu-det {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-size: .9rem;
}

.pd-edu-det div {
    display: flex;
    gap: 6px;
}

.pd-edu-det dt {
    color: var(--pd-muted);
}

.pd-edu-det dd {
    margin: 0;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-edu-staff {
    margin-top: 10px;
    padding-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    font-size: .88rem;
    color: var(--pd-ink-2);
    border-top: 1px dashed var(--pd-line-bold);
}

.pd-edu-staff .pd-lockdot {
    margin-left: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   ผลงานและรางวัล
   ระดับรางวัลใช้ความเข้มของสีแบรนด์ไล่จากสูงไปต่ำ ชื่อระดับเขียนกำกับทุกใบ สีเป็นตัวช่วยเท่านั้น
   ═══════════════════════════════════════════════════════════════════════ */

.pd {
    --pd-r1: #7c2d12;
    --pd-r2: #9a4508;
    --pd-r3: #1d4ed8;
    --pd-r4: #0e7490;
    --pd-r5: #047857;
    --pd-r6: #475569;
    --pd-r7: #57606e;
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd {
    --pd-r1: #fdba74;
    --pd-r2: #fcd34d;
    --pd-r3: #93c5fd;
    --pd-r4: #67e8f9;
    --pd-r5: #6ee7b7;
    --pd-r6: #cbd5e1;
    --pd-r7: #94a3b8;
}

.pd .r1 { --pd-rk: var(--pd-r1); }
.pd .r2 { --pd-rk: var(--pd-r2); }
.pd .r3 { --pd-rk: var(--pd-r3); }
.pd .r4 { --pd-rk: var(--pd-r4); }
.pd .r5 { --pd-rk: var(--pd-r5); }
.pd .r6 { --pd-rk: var(--pd-r6); }
.pd .r7 { --pd-rk: var(--pd-r7); }

.pd-aw-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    gap: clamp(12px, 1.4vw, 18px);
    align-items: start;
}

.pd-aw-grid > .pd-panel {
    position: sticky;
    top: calc(var(--pd-stick, 8.5rem) - 4px);
}

.pd-lvdot {
    flex: none;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--pd-rk);
}

.pd-bar.r1, .pd-bar.r2, .pd-bar.r3, .pd-bar.r4, .pd-bar.r5, .pd-bar.r6, .pd-bar.r7 {
    background: var(--pd-rk);
}

.pd-aw-grid .pd-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 5rem) auto;
}

.pd-aw-main {
    min-width: 0;
}

.pd-aw-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 14px;
    background: var(--pd-paper);
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r);
}

.pd-aw-tools .pd-find {
    margin-left: 0;
    flex: 1 1 16rem;
}

.pd-aw-tools .pd-find-in {
    flex: 1 1 auto;
}

.pd .pd-aw-tools .pd-find input {
    width: 100%;
}

.pd-chips-f {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-basis: 100%;
}

.pd .pd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 4px 12px;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    color: var(--pd-ink-2);
    background: var(--pd-paper);
    border: 1px solid var(--pd-line-bold);
    border-radius: 999px;
    cursor: pointer;
}

.pd .pd-chip b {
    min-width: 22px;
    padding: 0 7px;
    font-size: .8rem;
    line-height: 20px;
    text-align: center;
    color: var(--pd-ink-2);
    background: var(--pd-paper-alt);
    border-radius: 999px;
}

.pd .pd-chip:hover {
    border-color: var(--pd-brand);
    color: var(--pd-brand);
}

.pd .pd-chip[aria-pressed="true"] {
    color: #ffffff;
    background: var(--pd-brand);
    border-color: var(--pd-brand);
}

.pd .pd-chip[aria-pressed="true"] b {
    color: var(--pd-brand);
    background: #ffffff;
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd .pd-chip[aria-pressed="true"] {
    color: #0b1324;
}

:is(html.dark, html.dark-mode, html[data-theme="dark"],
    body.dark-mode, body[data-theme="dark"]) .pd .pd-chip[aria-pressed="true"] b {
    color: #0b1324;
}

.pd-aw-meta {
    font-size: .88rem;
    font-weight: 600;
    color: var(--pd-muted);
}

.pd-aws {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-aw {
    display: grid;
    grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
    gap: 14px;
    padding: 14px 18px 14px 16px;
    background: var(--pd-paper);
    border: 1px solid var(--pd-line);
    border-left: 5px solid var(--pd-rk);
    border-radius: 6px var(--pd-rs) var(--pd-rs) 6px;
    box-shadow: var(--pd-shadow);
}

.pd-aw-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.pd-aw-tag {
    padding: 2px 10px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--pd-rk);
    background: color-mix(in srgb, var(--pd-rk) 10%, var(--pd-paper));
    border: 1px solid color-mix(in srgb, var(--pd-rk) 35%, var(--pd-paper));
    border-radius: 999px;
}

.pd-aw-yr {
    font-family: var(--pd-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pd-ink);
    font-variant-numeric: tabular-nums;
}

.pd-aw-t {
    font-weight: 600;
    line-height: 1.6;
    color: var(--pd-ink);
    overflow-wrap: anywhere;
}

.pd-aw-m {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    font-size: .86rem;
    color: var(--pd-muted);
}

.pd-aw-empty {
    margin-top: 12px;
    padding: 22px;
    text-align: center;
    color: var(--pd-muted);
    background: var(--pd-paper);
    border: 1px dashed var(--pd-line-bold);
    border-radius: var(--pd-r);
}

/* ═══════════════════════════════════════════════════════════════════════
   ที่มาของข้อมูล
   ═══════════════════════════════════════════════════════════════════════ */

.pd-about {
    margin-top: clamp(28px, 3.4vw, 40px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
    padding: 14px 20px;
    font-size: .88rem;
    color: var(--pd-muted);
    background: var(--pd-paper-alt);
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-r);
}

.pd-about p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-about .pd-icon {
    flex: none;
    color: var(--pd-brand);
}

.pd .pd-about .pd-link {
    display: inline-block;
    min-height: 24px;
    padding: 2px 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   จอกลางและจอแคบ
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 1199.98px) {
    .pd-figs.is-5 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .pd-figs.is-5 > li {
        grid-column: span 2;
    }

    .pd-figs.is-5 > li:nth-child(4),
    .pd-figs.is-5 > li:nth-child(5) {
        grid-column: span 3;
    }

    .pd-aw-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pd-aw-grid > .pd-panel {
        position: static;
    }
}

@media (max-width: 1099.98px) {
    /* สองแถว: ชื่อห้องกับตัวเลขบน ครูร่วมกับลิงก์ล่าง (แถวล่างกว้างเต็มการ์ด ชื่อครูร่วมจึงเรียงข้างกันได้) */
    .pd-room {
        grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) auto;
        grid-template-areas: "main facts facts" "with with go";
        row-gap: 14px;
    }

    .pd-room-main { grid-area: main; }
    .pd-room-facts { grid-area: facts; }
    .pd .pd-room .pd-room-with { grid-area: with; }
    .pd .pd-room-go { grid-area: go; }

    .pd .pd-room .pd-room-with,
    .pd .pd-room .pd-room-go {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
        padding-top: 14px;
        border-top: 1px solid var(--pd-line);
    }
}

@media (max-width: 979.98px) {
    .pd-figs.is-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pd-sched-foot {
        grid-template-columns: minmax(0, 1fr);
    }

    .pd-minis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .pd-panel-note {
        margin-left: 0;
        flex-basis: 100%;
    }

    .pd-tools {
        position: static;
        border-radius: var(--pd-r);
        padding: 8px;
    }

    .pd-nav {
        flex-basis: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .pd-nav::-webkit-scrollbar {
        display: none;
    }

    .pd-nav-list {
        flex-wrap: nowrap;
    }

    .pd-tools-act {
        margin-left: 0;
        padding: 0 6px;
    }

    .pd-grid-wrap {
        display: none;
    }

    .pd-agenda {
        display: block;
    }

    .pd .pd-manage,
    .pd .pd-sec-link {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .pd-hero {
        padding-top: 22px;
    }

    .pd-face {
        width: 116px;
        height: 116px;
    }

    .pd-face-ini b {
        font-size: 2.8rem;
    }

    .pd-figs,
    .pd-figs.is-2,
    .pd-figs.is-3,
    .pd-figs.is-4,
    .pd-figs.is-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pd-figs.is-5 > li,
    .pd-figs.is-5 > li:nth-child(4) {
        grid-column: auto;
    }

    .pd-figs > li:last-child:nth-child(odd),
    .pd-figs.is-5 > li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .pd .pd-fig {
        padding: 16px 14px 14px;
    }

    .pd-fig-ic {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .pd-panel-head,
    .pd-panel-body {
        padding-inline: 14px;
    }

    .pd-edu {
        padding-left: 44px;
    }

    .pd-edu::before {
        left: 15px;
    }

    .pd-edu-dot {
        left: -44px;
        width: 34px;
        height: 34px;
    }

    .pd-edu-dot .pd-icon {
        width: 16px;
        height: 16px;
    }

    .pd-edu-card {
        padding: 14px 14px;
    }

    .pd-aw {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .pd-room {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "main" "facts" "with" "go";
        padding: 16px 16px 16px 20px;
    }

    .pd-room > * + *,
    .pd .pd-room .pd-room-with,
    .pd .pd-room .pd-room-go {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
        padding-top: 12px;
        border-top: 1px solid var(--pd-line);
    }

    .pd-aw-side {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   การเคลื่อนไหว

   ★ ทุกอย่างอยู่ใน prefers-reduced-motion: no-preference
   ★ สถานะ "รอเล่น" มีเฉพาะเมื่อสคริปต์ติดคลาส pd-motion ที่ <main> แล้วเท่านั้น
   ★ ที่รอเล่นได้: แผงเลื่อนลงจากที่เดิม 26px (ยังมองเห็นเต็มตา) แถบที่ยังไม่ยืด เส้นแกนการศึกษาที่ยังไม่ลากลง
     และการ์ดวุฒิกับการ์ดรางวัลที่ยังไม่เลื่อนเข้า — ทุกตัวมีข้อความกำกับครบเสมอ
   ═══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: no-preference) {

    .pd-hero-in > * {
        animation: pd-hero-rise .7s var(--pd-ease) both;
    }

    .pd-hero-in > :nth-child(2) { animation-delay: .04s; }
    .pd-hero-in > :nth-child(3) { animation-delay: .1s; }
    .pd-hero-in > :nth-child(4) { animation-delay: .14s; }
    .pd-hero-in > :nth-child(5) { animation-delay: .18s; }
    .pd-hero-in > :nth-child(6) { animation-delay: .22s; }

    .pd-hero::before {
        animation: pd-glow 1.8s var(--pd-ease) both;
    }

    /* รูปครูเข้ามาพร้อมวงแสงหนึ่งครั้ง */
    .pd-face {
        animation: pd-face-in .9s var(--pd-ease) both, pd-ring 1.6s var(--pd-ease) .7s 1;
    }

    .pd-rise {
        transition-property: translate;
        transition-duration: .75s;
        transition-timing-function: var(--pd-ease);
        transition-delay: var(--pd-d, 0s);
    }

    .pd.pd-motion [data-pd-reveal]:not(.is-in) .pd-rise,
    .pd.pd-motion [data-pd-reveal].pd-rise:not(.is-in) {
        translate: 0 26px;
    }

    .pd-figs > :nth-child(2) { --pd-d: .06s; }
    .pd-figs > :nth-child(3) { --pd-d: .12s; }
    .pd-figs > :nth-child(4) { --pd-d: .18s; }
    .pd-figs > :nth-child(5) { --pd-d: .24s; }

    .pd-rooms > :nth-child(2) { --pd-d: .06s; }
    .pd-rooms > :nth-child(3) { --pd-d: .12s; }
    .pd-aw-grid > :nth-child(2) { --pd-d: .08s; }

    .pd-fig::before,
    .pd-room::before {
        transition: transform .9s var(--pd-ease) calc(var(--pd-d, 0s) + .15s);
    }

    .pd.pd-motion .pd-figs:not(.is-in) .pd-fig::before {
        transform: scaleX(0);
    }

    .pd.pd-motion [data-pd-reveal]:not(.is-in) .pd-room::before {
        transform: scaleY(0);
    }

    .pd-bar,
    .pd-seg {
        transition: transform .9s var(--pd-ease) .15s;
    }

    .pd.pd-motion [data-pd-reveal]:not(.is-in) :is(.pd-bar, .pd-seg) {
        transform: scaleX(0);
    }

    /* เส้นแกนการศึกษาลากลง แล้ววุฒิเลื่อนเข้าทีละใบ (--k คือลำดับ) */
    .pd-edu::before {
        transition: transform 1s var(--pd-ease) .1s;
    }

    .pd.pd-motion .pd-edu:not(.is-in)::before {
        transform: scaleY(0);
    }

    .pd-edu-i {
        transition: translate .6s var(--pd-ease) calc(.15s + var(--k, 0) * .09s);
    }

    .pd.pd-motion .pd-edu:not(.is-in) .pd-edu-i {
        translate: 18px 0;
    }

    .pd-aw {
        transition: translate .55s var(--pd-ease) calc(.1s + var(--k, 0) * .05s), border-color .2s;
    }

    .pd.pd-motion .pd-aw-main:not(.is-in) .pd-aw {
        translate: 0 14px;
    }

    .pd-g-row > td {
        transition: translate .55s var(--pd-ease) calc(.15s + var(--r, 0) * .07s);
    }

    .pd.pd-motion [data-pd-reveal]:not(.is-in) .pd-g-row > td {
        translate: 18px 0;
    }

    .pd-sec-title::before {
        transition: transform .5s var(--pd-ease) .1s;
    }

    .pd.pd-motion .pd-sec:not(.is-in) .pd-sec-title::before {
        transform: scaleY(0);
    }

    .pd-glance-dot:not(.is-off) {
        animation: pd-live 1.8s var(--pd-ease) 1s 3;
    }

    .pd.pd-motion [data-pd-reveal].is-in .pd-day.is-today {
        animation: pd-pulse 1.4s var(--pd-ease) .9s 1;
    }
}

.pd.pd-arming *,
.pd.pd-arming *::before {
    transition: none !important;
}

@keyframes pd-hero-rise {
    from {
        transform: translateY(16px);
    }

    to {
        transform: none;
    }
}

@keyframes pd-face-in {
    from {
        transform: scale(.86);
    }

    to {
        transform: none;
    }
}

@keyframes pd-ring {
    0% {
        outline: 0 solid rgba(255, 255, 255, .55);
        outline-offset: 10px;
    }

    100% {
        outline: 14px solid rgba(255, 255, 255, 0);
        outline-offset: 22px;
    }
}

@keyframes pd-glow {
    from {
        transform: scale(.9);
        opacity: .2;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

@keyframes pd-live {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
    }

    100% {
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }
}

@keyframes pd-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--pd-brand) 50%, transparent);
    }

    100% {
        box-shadow: 0 0 0 10px color-mix(in srgb, var(--pd-brand) 0%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pd *,
    .pd *::before,
    .pd *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   โหมดคอนทราสต์สูง
   ไฟล์กลางบังคับ h1-h6 p li span div b small เป็นสีขาว ลิงก์เป็น #facc15 ปุ่มพื้นดำตัวขาวขอบเหลือง
   ที่นี่เขียนเฉพาะการ์ด เส้นขอบ แถบ และความหมายของสี (ห้ามตั้งสีตัวอักษรของ <button> เอง)
   ═══════════════════════════════════════════════════════════════════════ */

html.tb1-contrast-high .pd {
    --pd-neutral: #ffffff;
    --pd-warn: #facc15;
    --pd-ok: #ffffff;
    --pd-info: #ffffff;
    --pd-brand: #ffffff;
    --pd-g-subject: #ffffff;
    --pd-g-home: #ffffff;
    --pd-g-develop: #ffffff;
    --pd-g-work: #ffffff;
    --pd-r1: #facc15;
    --pd-r2: #facc15;
    --pd-r3: #ffffff;
    --pd-r4: #ffffff;
    --pd-r5: #ffffff;
    --pd-r6: #ffffff;
    --pd-r7: #ffffff;
}

html.tb1-contrast-high .pd-hero {
    background: #000000;
}

html.tb1-contrast-high .pd-hero::before,
html.tb1-contrast-high .pd-hero::after {
    display: none;
}

html.tb1-contrast-high .pd-hero-eyebrow,
html.tb1-contrast-high .pd-hero-chips li,
html.tb1-contrast-high .pd-glance,
html.tb1-contrast-high .pd .pd-glance-today {
    background: #000000;
    border-color: #facc15;
}

html.tb1-contrast-high .pd-glance {
    box-shadow: none;
}

html.tb1-contrast-high .pd-glance-chips li,
html.tb1-contrast-high .pd-glance-k b {
    background: #000000;
    border: 1px solid #ffffff;
}

html.tb1-contrast-high .pd .pd-glance-today:hover {
    box-shadow: inset 0 0 0 2px #facc15;
}

html.tb1-contrast-high .pd-face,
html.tb1-contrast-high .pd-face.is-head {
    box-shadow: 0 0 0 4px #000000, 0 0 0 7px #ffffff;
}

html.tb1-contrast-high .pd-face-ini,
html.tb1-contrast-high .pd-peer-ini,
html.tb1-contrast-high .pd-room-ic {
    background: #000000;
    box-shadow: 0 0 0 1px #ffffff;
}

html.tb1-contrast-high .pd .pd-fig,
html.tb1-contrast-high .pd-panel,
html.tb1-contrast-high .pd-tools,
html.tb1-contrast-high .pd-about,
html.tb1-contrast-high .pd-callout,
html.tb1-contrast-high .pd-sched-sum,
html.tb1-contrast-high .pd-mini,
html.tb1-contrast-high .pd-room,
html.tb1-contrast-high .pd-edu-card,
html.tb1-contrast-high .pd-edu-dot,
html.tb1-contrast-high .pd-aw,
html.tb1-contrast-high .pd-aw-tools,
html.tb1-contrast-high .pd-aw-tag,
html.tb1-contrast-high .pd-aw-empty,
html.tb1-contrast-high .pd-empty-card,
html.tb1-contrast-high .pd-day,
html.tb1-contrast-high .pd-chips li,
html.tb1-contrast-high .pd-fig-ic,
html.tb1-contrast-high .pd-panel-ic,
html.tb1-contrast-high .pd .pd-btn,
html.tb1-contrast-high .pd .pd-act,
html.tb1-contrast-high .pd .pd-chip,
html.tb1-contrast-high .pd .pd-chip b,
html.tb1-contrast-high .pd .pd-manage,
html.tb1-contrast-high .pd .pd-sec-link,
html.tb1-contrast-high .pd-sec-count,
html.tb1-contrast-high .pd-edu-top,
html.tb1-contrast-high .pd-lock,
html.tb1-contrast-high .pd-audience,
html.tb1-contrast-high .pd-audience-ic,
html.tb1-contrast-high .pd .pd-find input,
html.tb1-contrast-high .pd-today {
    background: #000000;
    border-color: #ffffff;
    box-shadow: none;
}

html.tb1-contrast-high .pd-fig-ic,
html.tb1-contrast-high .pd-panel-ic,
html.tb1-contrast-high .pd-audience-ic,
html.tb1-contrast-high .pd-sec-count,
html.tb1-contrast-high .pd-lock,
html.tb1-contrast-high .pd-today,
html.tb1-contrast-high .pd-edu-top {
    color: #ffffff;
    border: 1px solid #ffffff;
}

html.tb1-contrast-high .pd-lockdot,
html.tb1-contrast-high .pd-hero .pd-lockdot {
    color: #ffffff;
}

html.tb1-contrast-high .pd-panel-head,
html.tb1-contrast-high .pd-grid thead th,
html.tb1-contrast-high .pd-g-corner,
html.tb1-contrast-high .pd-g-day,
html.tb1-contrast-high .pd-g-c,
html.tb1-contrast-high .pd-blk,
html.tb1-contrast-high .pd-g-row.is-today td,
html.tb1-contrast-high .pd-g-row.is-today .pd-g-day,
html.tb1-contrast-high .pd-day.is-today,
html.tb1-contrast-high .pd-edu-i.is-top .pd-edu-card,
html.tb1-contrast-high .pd-edu-i.is-top .pd-edu-dot {
    background: #000000;
}

html.tb1-contrast-high .pd-panel-head,
html.tb1-contrast-high .pd-sec-head,
html.tb1-contrast-high .pd-row,
html.tb1-contrast-high .pd-legend,
html.tb1-contrast-high .pd-grid th,
html.tb1-contrast-high .pd-grid td,
html.tb1-contrast-high .pd-grid-scroll,
html.tb1-contrast-high .pd-sched-foot,
html.tb1-contrast-high .pd-room-with,
html.tb1-contrast-high .pd-room > *,
html.tb1-contrast-high .pd-edu-staff {
    border-color: #ffffff;
}

html.tb1-contrast-high .pd-fig::before,
html.tb1-contrast-high .pd-room::before,
html.tb1-contrast-high .pd-sec-title::before,
html.tb1-contrast-high .pd-edu::before {
    background: #ffffff;
}

html.tb1-contrast-high .pd-track,
html.tb1-contrast-high .pd-stack {
    background: #000000;
    box-shadow: inset 0 0 0 1px #ffffff;
}

html.tb1-contrast-high .pd-seg.is-subject,
html.tb1-contrast-high .pd-sw.is-subject {
    background: #ffffff;
}

html.tb1-contrast-high .pd-seg.is-home,
html.tb1-contrast-high .pd-sw.is-home {
    background: repeating-linear-gradient(135deg, #ffffff 0 3px, #000000 3px 6px);
}

html.tb1-contrast-high .pd-seg.is-develop,
html.tb1-contrast-high .pd-sw.is-develop {
    background: #facc15;
}

html.tb1-contrast-high .pd-seg.is-work,
html.tb1-contrast-high .pd-sw.is-work {
    background: radial-gradient(circle, #ffffff 1.2px, #000000 1.6px) 0 0 / 5px 5px;
}

html.tb1-contrast-high .pd-g-c.is-empty.is-break {
    background: repeating-linear-gradient(135deg, #000000 0 6px, #555555 6px 7px);
}

html.tb1-contrast-high .pd-g-c.is-multi {
    box-shadow: inset 0 3px 0 #facc15;
}

html.tb1-contrast-high .pd-g-row.is-today .pd-g-day {
    box-shadow: inset 5px 0 0 #facc15;
}

html.tb1-contrast-high .pd .pd-nav-a[aria-current="location"],
html.tb1-contrast-high .pd .pd-chip[aria-pressed="true"] {
    background: #facc15;
    border-color: #facc15;
}

html.tb1-contrast-high .pd .pd-nav-a[aria-current="location"],
html.tb1-contrast-high .pd .pd-nav-a[aria-current="location"] *,
html.tb1-contrast-high .pd .pd-chip[aria-pressed="true"],
html.tb1-contrast-high .pd .pd-chip[aria-pressed="true"] * {
    color: #000000 !important;
}

html.tb1-contrast-high .pd .pd-chip[aria-pressed="true"] b {
    background: #facc15;
}

html.tb1-contrast-high .pd .pd-nav-a:hover,
html.tb1-contrast-high .pd .pd-act:hover,
html.tb1-contrast-high .pd .pd-manage:hover,
html.tb1-contrast-high .pd .pd-sec-link:hover {
    background: #000000;
    box-shadow: inset 0 0 0 2px #facc15;
}

html.tb1-contrast-high .pd .pd-btn.is-primary {
    background: #000000;
    border: 2px solid #facc15;
}

/* ไฟล์กลางไม่รู้จัก dt dd จึงต้องบังคับสีเอง */
html.tb1-contrast-high .pd-edu-det dt,
html.tb1-contrast-high .pd-edu-det dd,
html.tb1-contrast-high .pd-room-facts dt,
html.tb1-contrast-high .pd-room-facts dd {
    color: #ffffff;
}

html.tb1-contrast-high .pd-tip {
    color: #ffffff;
    background: #000000;
    border: 1px solid #facc15;
}

html.tb1-contrast-high .pd :focus-visible {
    outline-color: #facc15;
}

/* ═══════════════════════════════════════════════════════════════════════
   พิมพ์ลงกระดาษ / บันทึก PDF (ประวัติหนึ่งฉบับ แนวตั้ง)
   ═══════════════════════════════════════════════════════════════════════ */

@media print {
    body.pd-page {
        background: #ffffff;
    }

    .pd {
        --pd-ink: #0f172a;
        --pd-ink-2: #334155;
        --pd-muted: #475569;
        --pd-paper: #ffffff;
        --pd-paper-alt: #f1f5f9;
        --pd-line: #cbd5e1;
        --pd-line-bold: #94a3b8;
        --pd-brand: #1d4ed8;
        --pd-g-subject: #1d4ed8;
        --pd-g-home: #0e7490;
        --pd-g-develop: #9a4508;
        --pd-g-work: #5a697f;
        color-scheme: light;
    }

    .pd *,
    .pd *::before,
    .pd *::after {
        transition: none !important;
        animation: none !important;
    }

    .pd-tools,
    .pd-audience,
    .pd-aw-tools,
    .pd-manage,
    .pd-sec-link,
    .pd-room-go,
    .pd-act,
    .pd-agenda,
    .pd-crumb,
    .pd-fig-ic,
    .pd-panel-ic,
    .pd-lock,
    .pd-lockdot,
    .pd-hero::before,
    .pd-hero::after,
    .pd-about .pd-link,
    .pd-grid-panel .pd-note,
    .pd-sec-note,
    .pd-tip,
    body.pd-page .tb1-footer,
    body.pd-page footer {
        display: none !important;
    }

    /* ผังตารางบนกระดาษแนวตั้งแคบ ย่อลงเล็กน้อยให้ช่องไม่สูงเกินไป */
    .pd-grid-panel {
        zoom: .86;
    }

    .pd-grid-wrap {
        display: block !important;
    }

    .pd-aw[hidden] {
        display: grid !important;
    }

    main.pd {
        padding: 0;
    }

    .pd-hero {
        margin: 0;
        padding: 0 0 10px;
        color: #000000;
        background: #ffffff;
        border-bottom: 2px solid #000000;
    }

    .pd-hero-in,
    .pd-hero-in.has-glance,
    .pd-hero-in:not(.has-glance) {
        max-width: none;
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        grid-template-areas: "face id";
        justify-content: stretch;
        column-gap: 16px;
        align-items: center;
        text-align: left;
    }

    .pd-hero-id {
        grid-area: id;
        align-items: flex-start;
    }

    /* การ์ดภาพรวมซ้ำกับหมวดตารางสอนที่พิมพ์อยู่แล้ว */
    .pd-glance {
        display: none !important;
    }

    .pd-face,
    .pd-face.is-head {
        grid-area: face;
        width: 96px;
        height: 96px;
        margin: 0;
        box-shadow: 0 0 0 2px #94a3b8;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .pd-hero-eyebrow {
        justify-self: start;
        padding: 0;
        color: #000000;
        background: none;
        border: 0;
    }

    .pd-hero-eyebrow .pd-icon,
    .pd-hero-chips .pd-icon {
        display: none;
    }

    .pd-hero .pd-hero-title,
    .pd-hero-role {
        margin-top: 0;
        color: #000000;
    }

    .pd-hero .pd-hero-title {
        font-size: 1.6rem;
    }

    .pd-hero-chips {
        justify-content: flex-start;
        margin-top: 4px;
    }

    .pd-hero-chips li,
    .pd-hero-chips li.is-staff {
        padding: 0 10px 0 0;
        color: #000000;
        background: none;
        border: 0;
    }

    .pd-figs,
    .pd-figs.is-2,
    .pd-figs.is-3,
    .pd-figs.is-4,
    .pd-figs.is-5 {
        margin-top: 12px;
        max-width: none;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .pd-figs.is-5 > li,
    .pd-figs.is-5 > li:nth-child(4),
    .pd-figs.is-5 > li:nth-child(5) {
        grid-column: auto;
    }

    .pd .pd-fig {
        padding: 8px 10px;
    }

    .pd .pd-fig,
    .pd-panel,
    .pd-room,
    .pd-edu-card,
    .pd-aw,
    .pd-sched-sum {
        box-shadow: none !important;
        border-color: #999999;
    }

    .pd [data-pd-reveal],
    .pd .pd-rise,
    .pd .pd-edu-i,
    .pd .pd-aw,
    .pd .pd-g-row > td {
        translate: none !important;
    }

    .pd .pd-fig::before,
    .pd .pd-room::before,
    .pd .pd-sec-title::before,
    .pd .pd-edu::before,
    .pd .pd-bar,
    .pd .pd-seg {
        transform: none !important;
    }

    .pd-fig::before,
    .pd-room::before,
    .pd-sec-title::before,
    .pd-edu::before,
    .pd-edu-dot,
    .pd-bar,
    .pd-seg,
    .pd-sw,
    .pd-blk,
    .pd-g-c,
    .pd-g-day,
    .pd-grid thead th,
    .pd-day,
    .pd-today,
    .pd-aw,
    .pd-aw-tag,
    .pd-lvdot {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .pd-sec {
        margin-top: 16px;
    }

    .pd-sec-head {
        break-after: avoid;
    }

    .pd-panel,
    .pd .pd-fig,
    .pd-room,
    .pd-edu-i,
    .pd-aw,
    .pd-sched-sum {
        break-inside: avoid;
    }

    .pd-aw-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pd-aw-grid > .pd-panel {
        position: static;
    }

    .pd-grid-scroll {
        overflow: visible;
    }

    .pd-grid {
        min-width: 0;
        font-size: 7.4pt;
    }

    .pd-g-corner,
    .pd-g-day {
        position: static;
    }

    .pd-g-corner {
        width: 58px;
    }

    .pd-g-h.is-break {
        width: 18px;
    }

    .pd-g-h.is-break .pd-g-t {
        display: none;
    }

    .pd-blk {
        padding: 3px 4px 3px 6px;
    }

    .pd-blk-t {
        font-size: 7.4pt;
    }

    .pd-blk-m,
    .pd-blk-k,
    .pd-blk-time,
    .pd-flag,
    .pd-g-multi {
        font-size: 6.4pt;
    }

    .pd a {
        color: #000000 !important;
        text-decoration: none !important;
    }
}
