Spaces:
Running
Running
Download shared/theme.css from dsuacademy/DSUdemy-Main: direct link, hf CLI and curl.
- Browser
- Download file 33.6 kB
-
https://huggingface.co/spaces/dsuacademy/DSUdemy-Main/resolve/main/shared/theme.css
- Command line
-
hf download hf://spaces/dsuacademy/DSUdemy-Main/shared/theme.css
-
curl -L -o theme.css https://huggingface.co/spaces/dsuacademy/DSUdemy-Main/resolve/main/shared/theme.css
33.6 kB
| /* theme.css: ระบบดีไซน์ dsudemy.net (Bento Grid โทนน้ำเงิน) ตาม DESIGN.md ฉบับ 1.3 | |
| ใช้ร่วมกันทุกหน้า หน้าหลักและหน้าย่อยลิงก์ไฟล์นี้ไฟล์เดียว ห้ามประกาศตัวแปรสีซ้ำในหน้า */ | |
| /* Layout: Bento Grid บนพื้นลายจุดแบบผืนผ้าใบเวิร์กโฟลว์ของ Dify, ส่วนหัวลอยแบบแคปซูล, คอนเทนเนอร์กว้างสุด 1240px */ | |
| :root{ | |
| --bg:#F2F4F7; --dot:rgba(16,24,40,.12); | |
| --surface:#FFFFFF; --surface-2:#F9FAFB; | |
| --ink:#101828; --ink-2:#354052; --muted:#5D6B82; | |
| --line:rgba(16,24,40,.08); --line-strong:rgba(16,24,40,.14); | |
| --accent:#0033FF; --accent-hover:#002CDE; --on-accent:#FFFFFF; | |
| --accent-ink:#0033FF; --accent-soft:#E9F0FF; --accent-soft-2:#D0DFFF; | |
| --navy:#0A1A4F; --navy-deep:#071238; --on-navy:#FFFFFF; --on-navy-2:#C7D3F5; --on-navy-accent:#8FA9FF; | |
| --on-navy-surface:rgba(255,255,255,.08); --on-navy-line:rgba(255,255,255,.14); | |
| --warn-bg:#FFFAEB; --warn-fg:#B54708; --ok-bg:#ECFDF3; --ok-fg:#027A48; | |
| --chip-bg:#F2F4F7; --chip-fg:#354052; --logo-plate:#FFFFFF; | |
| --focus:#0033FF; | |
| --scrim:rgba(6,15,51,.55); --glow:rgba(0,51,255,.38); --shadow:rgba(16,24,40,.35); | |
| --font-display:'Anuphan','IBM Plex Sans Thai','Noto Sans Thai',system-ui,sans-serif; | |
| --font-body:'IBM Plex Sans Thai','Noto Sans Thai',system-ui,sans-serif; | |
| --r-xl:28px; --r-lg:22px; --r-md:18px; --r-sm:12px; --r-pill:999px; | |
| --gutter:clamp(16px,3vw,24px); --maxw:1240px; | |
| } | |
| @media (prefers-color-scheme: dark){:root:not([data-theme="light"]){ | |
| --bg:#060F33; --dot:rgba(255,255,255,.07); | |
| --surface:#0D1A47; --surface-2:#12215A; | |
| --ink:#F2F4F7; --ink-2:#C7D3F5; --muted:#93A4C8; | |
| --line:rgba(255,255,255,.10); --line-strong:rgba(255,255,255,.18); | |
| --accent:#2952FF; --accent-hover:#3D63FF; --on-accent:#FFFFFF; | |
| --accent-ink:#9FB4FF; --accent-soft:rgba(143,169,255,.16); --accent-soft-2:rgba(143,169,255,.28); | |
| --navy:#16245E; --navy-deep:#040A24; --on-navy:#FFFFFF; --on-navy-2:#C7D3F5; --on-navy-accent:#8FA9FF; | |
| --on-navy-surface:rgba(255,255,255,.08); --on-navy-line:rgba(255,255,255,.14); | |
| --warn-bg:rgba(247,144,9,.16); --warn-fg:#FDB022; --ok-bg:rgba(18,183,106,.16); --ok-fg:#47CD89; | |
| --chip-bg:rgba(255,255,255,.08); --chip-fg:#C7D3F5; --logo-plate:#FFFFFF; | |
| --focus:#8FA9FF; | |
| --scrim:rgba(2,6,20,.7); --glow:rgba(41,82,255,.45); --shadow:rgba(0,0,0,.6); | |
| color-scheme:dark; | |
| }} | |
| :root[data-theme="dark"]{ | |
| --bg:#060F33; --dot:rgba(255,255,255,.07); | |
| --surface:#0D1A47; --surface-2:#12215A; | |
| --ink:#F2F4F7; --ink-2:#C7D3F5; --muted:#93A4C8; | |
| --line:rgba(255,255,255,.10); --line-strong:rgba(255,255,255,.18); | |
| --accent:#2952FF; --accent-hover:#3D63FF; --on-accent:#FFFFFF; | |
| --accent-ink:#9FB4FF; --accent-soft:rgba(143,169,255,.16); --accent-soft-2:rgba(143,169,255,.28); | |
| --navy:#16245E; --navy-deep:#040A24; --on-navy:#FFFFFF; --on-navy-2:#C7D3F5; --on-navy-accent:#8FA9FF; | |
| --on-navy-surface:rgba(255,255,255,.08); --on-navy-line:rgba(255,255,255,.14); | |
| --warn-bg:rgba(247,144,9,.16); --warn-fg:#FDB022; --ok-bg:rgba(18,183,106,.16); --ok-fg:#47CD89; | |
| --chip-bg:rgba(255,255,255,.08); --chip-fg:#C7D3F5; --logo-plate:#FFFFFF; | |
| --focus:#8FA9FF; | |
| --scrim:rgba(2,6,20,.7); --glow:rgba(41,82,255,.45); --shadow:rgba(0,0,0,.6); | |
| color-scheme:dark; | |
| } | |
| /* Base */ | |
| *{box-sizing:border-box} | |
| [hidden]{display:none} | |
| img{max-width:100%} | |
| html{scroll-behavior:smooth} | |
| body{min-height:100vh;display:flex;flex-direction:column} | |
| body>main{flex:1 0 auto} | |
| body{margin:0;background-color:var(--bg);background-image:radial-gradient(var(--dot) 1px,transparent 1px);background-size:18px 18px;color:var(--ink);font-family:var(--font-body);font-size:16px;line-height:1.7;-webkit-font-smoothing:antialiased} | |
| h1,h2,h3{font-family:var(--font-display);line-height:1.3;letter-spacing:-.01em;text-wrap:balance;margin:0} | |
| p{margin:0} | |
| a{color:var(--accent-ink)} | |
| a:hover{color:var(--accent-hover)} | |
| /* วงโฟกัส: --focus บนพื้นสว่าง และ --on-navy-accent บนพื้นกรมท่า (ตั้งที่คอมโพเนนต์พื้นเข้มด้านล่าง) */ | |
| :focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:10px} | |
| .event,.footer,.toast{--focus:var(--on-navy-accent)} | |
| button{font:inherit;color:inherit} | |
| .wrap{max-width:var(--maxw);margin-inline:auto;padding-inline:var(--gutter)} | |
| .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} | |
| section{scroll-margin-top:96px} | |
| .tnum{font-variant-numeric:tabular-nums} | |
| .nw{white-space:nowrap} | |
| /* ตัวช่วยจัดวาง (ใช้แทน style ในหน้า) */ | |
| .stack-xs{display:flex;flex-direction:column;gap:4px} | |
| .stack-sm{display:flex;flex-direction:column;gap:8px} | |
| .text-2{color:var(--ink-2)} | |
| .label-sm{font-size:13px;color:var(--ink-2)} | |
| .grid-full{grid-column:1/-1} | |
| /* Header */ | |
| .site-header{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;padding-block:14px 0} | |
| .bar{display:flex;align-items:center;justify-content:space-between;gap:12px;background:color-mix(in srgb,var(--surface) 90%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:20px;padding:8px 8px 8px 14px;box-shadow:0 10px 26px -18px var(--shadow)} | |
| .brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);min-width:0} | |
| .logo{flex:0 0 46px;width:46px;height:46px;border-radius:50%;background:var(--logo-plate);box-shadow:0 0 0 1px var(--line);display:grid;place-items:center} | |
| .logo img{width:42px;height:42px;display:block} | |
| .brand-text{display:flex;flex-direction:column;line-height:1.3;min-width:0} | |
| .brand-name{font-family:var(--font-display);font-weight:700;font-size:17px} | |
| .brand-sub{font-size:12px;color:var(--muted)} | |
| .nav{display:flex;gap:2px;font-size:15px;font-weight:500} | |
| .nav a{padding:9px 13px;border-radius:12px;text-decoration:none;color:var(--ink-2);white-space:nowrap} | |
| .nav a:hover{background:var(--accent-soft);color:var(--accent-ink)} | |
| .nav a[aria-current="true"],.nav a[aria-current="page"]{background:var(--accent-soft);color:var(--accent-ink)} | |
| .tools{display:flex;gap:6px;align-items:center} | |
| .icon-btn{width:44px;height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface-2);display:grid;place-items:center;cursor:pointer;color:var(--ink)} | |
| .icon-btn:hover{border-color:var(--accent-soft-2);color:var(--accent-ink)} | |
| .icon-btn svg{width:20px;height:20px} | |
| .menu-btn{display:none} | |
| .mobile-nav{margin-top:8px;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:10px;display:flex;flex-direction:column;gap:2px;box-shadow:0 20px 40px -24px var(--shadow);max-height:calc(100dvh - 110px);overflow-y:auto;overscroll-behavior:contain} | |
| .mobile-nav a{padding:13px 14px;border-radius:12px;text-decoration:none;color:var(--ink);font-weight:500} | |
| .mobile-nav a[aria-current="true"],.mobile-nav a[aria-current="page"]{background:var(--accent-soft);color:var(--accent-ink)} | |
| .mobile-theme{display:none;min-height:48px;margin-top:6px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);font-weight:500;text-align:left;cursor:pointer} | |
| @media (max-width:1200px){.nav{display:none}.menu-btn{display:grid}} | |
| /* จอ ≤420px ปุ่มสลับธีมอยู่ในเมนูมือถือแทน ชื่อฝ่ายในแคปซูลจึงไม่ถูกบัง */ | |
| @media (max-width:420px){#themeBtn{display:none}.mobile-theme{display:block}} | |
| @media (max-width:520px){.brand-sub{display:none}.brand-name{font-size:15px}.logo{flex-basis:40px;width:40px;height:40px}.logo img{width:36px;height:36px}} | |
| /* Bento */ | |
| .bento{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px} | |
| .s2{grid-column:span 2}.r2{grid-row:span 2} | |
| @media (max-width:960px){.bento{grid-template-columns:repeat(2,minmax(0,1fr))}} | |
| @media (max-width:600px){.bento{grid-template-columns:minmax(0,1fr)}.s2{grid-column:auto}.r2{grid-row:auto}.bento .half{grid-column:auto}} | |
| .tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xl);min-width:0} | |
| .lift{transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease} | |
| .lift:hover{transform:translateY(-4px);box-shadow:0 18px 34px -18px var(--glow)} | |
| /* Hero */ | |
| .hero{padding-block:28px 16px} | |
| .hero-main{padding:clamp(24px,4vw,40px);display:flex;flex-direction:column;justify-content:flex-start;gap:26px;min-height:440px} | |
| /* การ์ดหัวข้อหลัก: กลุ่มบน (ป้ายภาคเรียน + H1) ตามด้วยย่อหน้านำทันที คั่นด้วยเส้นบาง แถวปุ่มชิดขอบล่างของการ์ด */ | |
| .hero-top{display:flex;flex-direction:column;gap:20px} | |
| .hero-foot{flex:1 1 auto;display:flex;flex-direction:column;gap:18px;padding-top:22px;border-top:1px solid var(--line)} | |
| .hero-foot .btn-row{margin-top:auto} | |
| /* ปุ่ม 4 ปุ่มตาราง 2 คอลัมน์กว้างเท่ากัน ปุ่มหลักมีใบเดียว (บริการวิชาการ) */ | |
| .hero-foot .hero-btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px} | |
| .hero-btns .btn{padding:0 14px;text-align:center} | |
| /* จอแคบ 2 คอลัมน์แคบเกินจนชื่อปุ่มตัดกลางคำ จึงเรียงคอลัมน์เดียวเต็มความกว้าง */ | |
| @media (max-width:520px){.hero-foot .hero-btns{grid-template-columns:minmax(0,1fr)}} | |
| .hero-foot .lead{font-size:16px} | |
| .node-chip{align-self:flex-start;display:inline-flex;align-items:center;gap:10px;padding:6px 14px 6px 8px;border-radius:var(--r-pill);background:var(--chip-bg);font-size:14px;font-weight:500;color:var(--chip-fg)} | |
| .pulse{position:relative;width:10px;height:10px;border-radius:50%;background:var(--accent)} | |
| .pulse::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid var(--accent);opacity:.5;animation:pulse 2.4s ease-out infinite} | |
| @keyframes pulse{0%{transform:scale(.6);opacity:.6}100%{transform:scale(1.8);opacity:0}} | |
| .hero h1{font-size:clamp(32px,4.2vw,54px);font-weight:700;color:var(--ink)} | |
| .hero h1 em{font-style:normal;color:var(--accent-ink)} | |
| .lead{font-size:17px;color:var(--ink-2);max-width:34em} | |
| /* Buttons */ | |
| .btn-row{display:flex;flex-wrap:wrap;gap:12px} | |
| .btn{min-height:48px;padding:0 22px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:14px;font-weight:600;text-decoration:none;border:none;cursor:pointer;font-size:16px} | |
| .btn-sm{min-height:44px;padding:0 16px;font-size:15px} | |
| .btn-primary{background:var(--accent);color:var(--on-accent)} | |
| .btn-primary:hover{background:var(--accent-hover);color:var(--on-accent)} | |
| .btn-quiet{background:var(--chip-bg);color:var(--ink)} | |
| .btn-quiet:hover{color:var(--accent-ink)} | |
| .btn-on-dark{background:var(--on-navy);color:var(--navy)} | |
| .btn-on-dark:hover{color:var(--navy);box-shadow:0 0 0 3px var(--on-navy-accent)} | |
| .btn[aria-disabled="true"]{background:var(--chip-bg);color:var(--muted);cursor:not-allowed} | |
| /* การ์ดกรมท่าและกิจกรรมเด่นแบบรายการ */ | |
| .event{background:var(--navy);border-color:transparent;color:var(--on-navy);padding:24px;display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-height:212px;text-decoration:none} | |
| .eyebrow-dark{font-size:13px;font-weight:600;color:var(--on-navy-accent);letter-spacing:.04em} | |
| .event-range{font-family:var(--font-display);font-size:40px;font-weight:700;line-height:1} | |
| .event-month{font-size:14px;color:var(--on-navy-2)} | |
| .event-place{font-size:14px;color:var(--on-navy-2);line-height:1.5} | |
| .event-host{font-size:13px} | |
| .countdown{display:inline-flex;align-self:flex-start;gap:6px;align-items:baseline;padding:4px 10px;border-radius:var(--r-pill);background:var(--on-navy-surface);font-size:13px;color:var(--on-navy)} | |
| .featured{padding:24px;display:flex;flex-direction:column;gap:16px;min-height:212px} | |
| .feat-main{display:grid;grid-template-columns:minmax(0,auto) minmax(0,1fr);gap:10px 28px;align-items:start} | |
| .feat-date{display:flex;flex-direction:column;gap:4px} | |
| .feat-info{display:flex;flex-direction:column;gap:6px;min-width:0} | |
| .feat-info h2{font-size:20px;color:var(--on-navy);line-height:1.4} | |
| .feat-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:6px} | |
| .feat-next{border-top:1px solid var(--on-navy-line);padding-top:12px;display:flex;flex-direction:column;gap:4px} | |
| .feat-next ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column} | |
| .feat-next a{color:var(--on-navy);text-decoration:none;display:grid;grid-template-columns:minmax(120px,auto) minmax(0,1fr);gap:2px 14px;min-height:44px;align-items:center;font-size:14px;line-height:1.5} | |
| .feat-next a:hover{color:var(--on-navy-accent)} | |
| .feat-next .when{color:var(--on-navy-accent);font-weight:600} | |
| @media (max-width:600px){.feat-main{grid-template-columns:minmax(0,1fr)}.feat-next a{grid-template-columns:minmax(0,1fr);padding-block:6px}} | |
| /* แผงวันนี้ที่สาธิต */ | |
| .today{padding:clamp(20px,3vw,28px);display:flex;flex-direction:column;gap:14px;min-height:212px} | |
| .today-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 12px} | |
| .today-title{font-family:var(--font-body)} | |
| .today-date{font-family:var(--font-display);font-weight:600;font-size:18px;color:var(--ink)} | |
| .status{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;padding:5px 12px;border-radius:var(--r-pill);font-size:14px;font-weight:600;line-height:1.5} | |
| .status-study{background:var(--ok-bg);color:var(--ok-fg)} | |
| .status-off{background:var(--warn-bg);color:var(--warn-fg)} | |
| .status-plain{background:var(--chip-bg);color:var(--chip-fg)} | |
| .next-label{font-size:13px;font-weight:600;color:var(--muted)} | |
| .next-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px} | |
| .next-list li{display:grid;grid-template-columns:minmax(118px,auto) minmax(0,1fr);gap:2px 14px;font-size:14px;line-height:1.55} | |
| .next-when{font-weight:600;color:var(--accent-ink)} | |
| .next-title{color:var(--ink-2)} | |
| @media (max-width:420px){.next-list li{grid-template-columns:minmax(0,1fr)}} | |
| .today-foot{margin-top:auto;display:flex;flex-wrap:wrap;gap:10px;align-items:center} | |
| .src-note{font-size:12px;color:var(--muted);line-height:1.5} | |
| .src-note.spaced{margin-top:14px} | |
| /* Section heads */ | |
| .section{padding-block:28px} | |
| .section.first{padding-top:8px} | |
| .sec-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 20px;margin-bottom:20px} | |
| .sec-head.tight{margin-bottom:16px} | |
| .sec-head-text{display:flex;flex-direction:column;gap:6px;min-width:0} | |
| .sec-head-text.narrow{max-width:640px} | |
| .eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--accent-ink)} | |
| .eyebrow::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor} | |
| .sec-title{font-size:clamp(26px,3vw,36px);color:var(--ink)} | |
| .sec-intro{color:var(--ink-2);font-size:15px} | |
| .result-note{font-size:14px;color:var(--muted);margin:0 0 12px} | |
| .result-note.flush{margin:0} | |
| .empty{border:1px dashed var(--line-strong);border-radius:var(--r-lg);padding:32px;text-align:center;color:var(--muted)} | |
| /* บริการวิชาการ (การ์ดคงขนาด ไม่ยืดเต็มแถวเมื่อมีน้อยรายการ) */ | |
| .quick{padding:clamp(18px,3vw,28px)} | |
| .quick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:12px} | |
| .qlink{border-radius:var(--r-md);background:var(--surface-2);border:1px solid var(--line);padding:16px;display:flex;flex-direction:column;gap:10px;text-decoration:none;color:var(--ink);min-height:112px} | |
| .qlink svg{width:26px;height:26px;color:var(--accent-ink)} | |
| .qlink-label{font-weight:600;line-height:1.4} | |
| .qlink-label.lg{font-size:20px} | |
| .qlink-desc{font-size:13px;color:var(--muted);line-height:1.5} | |
| .qlink-aud{margin-top:auto;font-size:12px;color:var(--muted)} | |
| .qlink-note{align-self:flex-start;font-size:12px;font-weight:600;padding:1px 8px;border-radius:var(--r-pill);background:var(--warn-bg);color:var(--warn-fg)} | |
| @media (max-width:420px){.quick-grid{grid-template-columns:minmax(0,1fr)}.qlink{min-height:0}} | |
| /* แถบเลือกกลุ่มผู้ใช้ ("แสดงข้อมูลสำหรับ") */ | |
| .aud-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:16px} | |
| .aud-label{font-size:14px;font-weight:600;color:var(--ink-2)} | |
| /* จอแคบ: ชิปเรียงแถวเดียว เลื่อนแนวนอนภายในแถบ (เผื่อพื้นที่ให้วงโฟกัสไม่ถูกตัด) */ | |
| @media (max-width:600px){ | |
| .aud-bar .chips{flex:1 1 100%;min-width:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding:6px 4px;margin:-6px -4px} | |
| .aud-bar .chip{flex:0 0 auto} | |
| } | |
| /* Chips and tags */ | |
| .chips{display:flex;flex-wrap:wrap;gap:8px} | |
| .chips.tight{gap:6px} | |
| .chip{min-height:40px;padding:0 15px;border-radius:var(--r-pill);border:1px solid var(--line-strong);background:var(--surface);color:var(--ink-2);font-size:14px;cursor:pointer} | |
| .chip:hover{border-color:var(--accent);color:var(--accent-ink)} | |
| .chip[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:var(--on-navy)} | |
| .tag{display:inline-flex;align-items:center;font-size:12px;font-weight:600;padding:2px 10px;border-radius:var(--r-pill);white-space:nowrap} | |
| .tag-ai{background:var(--accent-soft);color:var(--accent-ink)} | |
| .tag-interactive{background:var(--ok-bg);color:var(--ok-fg)} | |
| .tag-pilot{background:var(--warn-bg);color:var(--warn-fg)} | |
| .tag-soon{background:var(--chip-bg);color:var(--chip-fg)} | |
| .tag-open{background:var(--ok-bg);color:var(--ok-fg)} | |
| .soon-badge{align-self:flex-start;font-size:13px;font-weight:600;padding:2px 10px;border-radius:var(--r-pill);background:var(--chip-bg);color:var(--chip-fg)} | |
| /* ศูนย์และหน่วยงาน (อยู่ในการ์ดขาวของส่วน การ์ดหน่วยงานเป็นพื้นอ่อนแบบการ์ดย่อยของส่วนอื่น) */ | |
| .unit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px} | |
| @media (max-width:700px){.unit-grid{grid-template-columns:minmax(0,1fr)}} | |
| .unit-card{background:var(--surface-2);border-radius:var(--r-lg);padding:20px 22px;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:16px} | |
| .unit-card>.area-ic{align-self:start} | |
| .unit-body{display:flex;flex-direction:column;gap:8px} | |
| @media (max-width:420px){.unit-card{grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr;row-gap:10px}} | |
| .unit-card h3{font-size:18px;line-height:1.4} | |
| .unit-card h3.long{font-size:17px;line-height:1.45} | |
| .unit-th{font-size:13px;color:var(--muted);line-height:1.5} | |
| .unit-desc{font-size:14px;color:var(--ink-2);line-height:1.6} | |
| .unit-actions{margin-top:auto;padding-top:6px;display:flex;flex-wrap:wrap;gap:8px} | |
| .unit-actions.spaced{margin-top:10px} | |
| .link-btn{min-height:44px;padding:0 14px;border-radius:12px;display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:14px;text-decoration:none;background:var(--accent-soft);color:var(--accent-ink)} | |
| .link-btn:hover{background:var(--accent-soft-2);color:var(--accent-ink)} | |
| .link-btn.ghost{background:transparent;border:1px solid var(--line-strong);color:var(--ink)} | |
| .link-btn.ghost:hover{border-color:var(--accent);color:var(--accent-ink)} | |
| .link-btn svg{width:16px;height:16px} | |
| /* ช่องทางติดต่อที่กดไม่ได้ (เช่น LINE ที่ไม่มีลิงก์) แสดงเป็นป้าย ไม่ใช่หน้าตาปุ่ม */ | |
| .contact-chip{min-height:44px;display:inline-flex;align-items:center;padding:0 4px;font-size:14px;color:var(--ink-2)} | |
| /* หลักสูตรห้องเรียนพิเศษ */ | |
| .prog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px} | |
| .prog-card{border-radius:var(--r-md);background:var(--surface-2);border:1px solid var(--line);padding:18px;display:flex;flex-direction:column;gap:6px;text-decoration:none;color:var(--ink);position:relative;padding-right:44px} | |
| .prog-arrow{position:absolute;top:20px;right:16px;color:var(--accent-ink)} | |
| .prog-card:hover{color:var(--ink)} | |
| .prog-name{font-family:var(--font-display);font-weight:700;font-size:20px;line-height:1.3} | |
| .prog-sub{font-size:13px;color:var(--muted);line-height:1.5} | |
| .prog-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:16px;align-items:start} | |
| .prog-detail{padding:clamp(20px,3vw,28px);display:flex;flex-direction:column;gap:12px;scroll-margin-top:96px} | |
| .prog-detail h2{font-size:clamp(22px,2.6vw,28px)} | |
| .prog-detail h3{font-size:17px} | |
| .prog-contact{font-size:14px;color:var(--ink-2)} | |
| /* DSUdemy Hub (การ์ดขาวเหมือนส่วนอื่น จุดสังเกตคือแถบประตูตรวจ) */ | |
| .hub{padding:clamp(20px,3.5vw,36px);border-radius:32px} | |
| .hub-intro{color:var(--ink-2)} | |
| .hub-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:18px} | |
| /* แถบประตูตรวจ 4 ขั้น: โหนดเลขลำดับเชื่อมด้วยเส้น แบบผืนผ้าใบเวิร์กโฟลว์ */ | |
| .gate{display:flex;flex-direction:column;gap:10px;margin-bottom:22px} | |
| .gate-label{font-size:13px;font-weight:600;letter-spacing:.04em;color:var(--muted)} | |
| .gate-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;counter-reset:gate} | |
| .gate-steps li{position:relative;display:flex;align-items:center;gap:12px;min-width:0;padding:12px 14px;border-radius:var(--r-md);background:var(--surface-2);border:1px solid var(--line);font-size:14px;line-height:1.45;color:var(--ink);counter-increment:gate} | |
| .gate-steps li::before{content:counter(gate);flex:0 0 28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:var(--on-accent);font-size:13px;font-weight:600;box-shadow:0 0 0 4px var(--accent-soft)} | |
| .gate-steps li:not(:last-child)::after{content:"";position:absolute;top:50%;right:-13px;width:12px;height:2px;background:var(--line-strong)} | |
| @media (max-width:960px){.gate-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.gate-steps li:nth-child(2)::after{display:none}} | |
| @media (max-width:600px){.gate-steps{grid-template-columns:minmax(0,1fr);gap:8px}.gate-steps li:not(:last-child)::after{display:block;top:auto;right:auto;bottom:-9px;left:27px;width:2px;height:8px}} | |
| .hub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px} | |
| .app-card{all:unset;box-sizing:border-box;cursor:pointer;border-radius:var(--r-lg);background:var(--surface-2);border:1px solid var(--line);padding:22px;display:flex;flex-direction:column;gap:10px;min-height:190px;color:var(--ink)} | |
| .app-card:focus-visible{outline:3px solid var(--focus);outline-offset:3px} | |
| .app-card h3{font-size:18px} | |
| .app-card p{font-size:14px;color:var(--muted);line-height:1.6} | |
| .app-foot{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:13px;color:var(--muted)} | |
| .app-foot span:last-child{display:inline-flex;align-items:center;gap:4px;color:var(--accent-ink);font-weight:600;white-space:nowrap} | |
| /* Search field */ | |
| .search{position:relative;flex:1 1 260px;max-width:380px} | |
| .search input{width:100%;min-height:46px;border-radius:14px;border:1px solid var(--line-strong);background:var(--surface-2);color:var(--ink);padding:0 14px 0 42px;font:inherit;font-size:15px} | |
| .search input::placeholder{color:var(--muted)} | |
| .search svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--muted)} | |
| /* About */ | |
| .mission{background:var(--accent-soft);border-color:var(--accent-soft-2);padding:clamp(24px,4vw,36px);display:flex;flex-direction:column;justify-content:space-between;gap:20px} | |
| .mission h2{font-size:clamp(24px,3vw,36px)} | |
| .pill-row{display:flex;flex-wrap:wrap;gap:8px} | |
| .pill{font-size:13px;padding:5px 12px;border-radius:var(--r-pill);background:var(--surface);color:var(--ink);text-decoration:none} | |
| .area{padding:22px;display:flex;flex-direction:column;gap:6px} | |
| .area h3{font-size:17px} | |
| .area p{font-size:14px;color:var(--muted)} | |
| .area-ic{width:40px;height:40px;border-radius:12px;background:var(--accent-soft);display:grid;place-items:center;color:var(--accent-ink);margin-bottom:6px} | |
| .area-ic svg{width:20px;height:20px} | |
| /* News (ไม่ใช้บนหน้าหลักตั้งแต่ฉบับ 1.2 เก็บไว้สำหรับหน้าข่าวภายหลัง ตาม DESIGN.md 8.11) */ | |
| .news-card{display:flex;flex-direction:column;overflow:hidden;text-decoration:none;color:var(--ink)} | |
| .news-card:hover{color:var(--ink)} | |
| .news-img{height:260px;display:grid;place-items:center;background-color:var(--accent-soft-2);color:var(--ink-2);font-size:14px;padding:16px;text-align:center} | |
| img.news-img{width:100%;object-fit:cover;padding:0;display:block} | |
| .news-body{padding:24px;display:flex;flex-direction:column;gap:8px} | |
| .news-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:14px;color:var(--muted)} | |
| .news-card h3{font-size:22px} | |
| .news-row{padding:20px 22px;display:flex;gap:16px;align-items:flex-start;text-decoration:none;color:var(--ink)} | |
| .news-row:hover{color:var(--ink)} | |
| .datebox{flex:0 0 60px;height:64px;border-radius:16px;background:var(--accent-soft);display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.2} | |
| .datebox b{font-family:var(--font-display);font-size:20px;color:var(--accent-ink)} | |
| .datebox span{font-size:12px;color:var(--ink-2)} | |
| .news-row h3{font-size:17px} | |
| .cat{font-size:13px;font-weight:600;color:var(--muted)} | |
| .news-list{display:flex;flex-direction:column;gap:12px;min-width:0;grid-column:1/-1} | |
| .news-list.s2{grid-column:span 2} | |
| @media (max-width:600px){.news-list.s2{grid-column:auto}} | |
| /* Dialogs */ | |
| dialog{border:none;padding:0;border-radius:24px;background:var(--surface);color:var(--ink);width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 48px);box-shadow:0 30px 60px -20px var(--shadow)} | |
| dialog::backdrop{background:var(--scrim)} | |
| dialog.wide{width:min(720px,calc(100vw - 32px))} | |
| .dlg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:22px 22px 0} | |
| .dlg-title{font-size:24px} | |
| .dlg-title.sm{font-size:20px} | |
| .dlg-body{padding:16px 22px 22px;display:flex;flex-direction:column;gap:14px;overflow:auto} | |
| .facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 16px;font-size:14px;margin:0} | |
| .facts dt{color:var(--muted)} | |
| .facts dd{margin:0} | |
| .notice{font-size:13px;color:var(--ink-2);background:var(--chip-bg);border-radius:12px;padding:10px 12px} | |
| .search-dlg .search{max-width:none} | |
| .results{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px} | |
| .results a{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:12px;text-decoration:none;color:var(--ink)} | |
| .results a:hover,.results a:focus-visible{background:var(--accent-soft);color:var(--accent-ink)} | |
| .results small{color:var(--muted);white-space:nowrap} | |
| kbd{font-family:inherit;font-size:12px;padding:1px 6px;border-radius:6px;border:1px solid var(--line-strong);color:var(--muted)} | |
| .kbd-hint{font-size:13px;color:var(--muted)} | |
| @media (hover:none),(pointer:coarse),(max-width:600px){.kbd-hint{display:none}} | |
| /* กำหนดการแยกเดือน (หน้าต่างกำหนดการ หน้าแนะแนว หน้าหลักสูตร) */ | |
| .cal-month{font-family:var(--font-body);font-size:14px;font-weight:600;color:var(--muted);margin:8px 0 2px} | |
| .cal-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px} | |
| .cal-list li{display:grid;grid-template-columns:minmax(128px,auto) minmax(0,1fr);gap:2px 16px;padding:10px 12px;border-radius:12px;font-size:14px;line-height:1.55} | |
| .cal-list li:nth-child(odd){background:var(--surface-2)} | |
| .cal-when{font-weight:600;color:var(--accent-ink)} | |
| .cal-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px} | |
| @media (max-width:520px){.cal-list li{grid-template-columns:minmax(0,1fr)}} | |
| /* Footer */ | |
| .footer{margin-top:40px;background:var(--navy-deep);color:var(--on-navy-2)} | |
| .footer-grid{display:flex;flex-wrap:wrap;gap:36px;padding-block:52px 32px} | |
| .footer-grid > div{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:6px} | |
| .footer-grid > .footer-brand{flex-grow:1.4} | |
| .footer-name{font-family:var(--font-display);font-weight:700;font-size:20px;color:var(--on-navy)} | |
| .footer h2{font-size:15px;color:var(--on-navy);font-family:var(--font-body);font-weight:600} | |
| .footer a{color:var(--on-navy-2)} | |
| .footer a:hover{color:var(--on-navy)} | |
| .footer-note{font-size:13px;color:var(--on-navy-2);opacity:.85} | |
| .copy-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap} | |
| .copy-btn{min-height:36px;padding:0 12px;border-radius:10px;border:1px solid var(--on-navy-line);background:transparent;color:var(--on-navy);cursor:pointer;font-size:13px} | |
| .footer-bottom{border-top:1px solid var(--on-navy-line);padding-block:16px;text-align:center;font-size:14px;color:var(--on-navy-accent)} | |
| /* Toast and back to top */ | |
| .toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:50;background:var(--navy);color:var(--on-navy);padding:12px 18px;border-radius:14px;font-size:14px;box-shadow:0 16px 30px -14px var(--shadow);max-width:calc(100vw - 32px)} | |
| .to-top{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:30;width:48px;height:48px;border-radius:50%;border:none;background:var(--accent);color:var(--on-accent);display:grid;place-items:center;cursor:pointer;box-shadow:0 12px 24px -10px var(--glow)} | |
| .to-top svg{width:22px;height:22px} | |
| /* หน้าย่อย */ | |
| .breadcrumb{display:flex;flex-wrap:wrap;align-items:center;gap:0 6px;font-size:14px;color:var(--muted);padding-block:20px 0} | |
| /* พื้นที่กดของ breadcrumb บนจอสัมผัสอย่างน้อย 44px */ | |
| .breadcrumb a{color:var(--muted);text-decoration:none;min-height:44px;display:inline-flex;align-items:center} | |
| .breadcrumb a:hover{color:var(--accent-ink)} | |
| .breadcrumb [aria-current="page"]{color:var(--ink)} | |
| .page-hero{padding:clamp(24px,4vw,40px);display:flex;flex-direction:column;gap:14px} | |
| .page-hero h1{font-size:clamp(28px,3.6vw,44px);color:var(--ink)} | |
| .page-hero h1.long{font-size:clamp(24px,2.8vw,34px);line-height:1.35} | |
| .page-hero .unit-th{font-size:15px} | |
| .page-hero .pill{background:var(--chip-bg);color:var(--chip-fg)} | |
| .page-hero .pill:hover{color:var(--accent-ink)} | |
| .hero-actions{display:flex;flex-wrap:wrap;gap:8px} | |
| .panel{padding:clamp(20px,3vw,28px);display:flex;flex-direction:column;gap:14px} | |
| .panel h2{font-size:clamp(20px,2.4vw,26px)} | |
| .plain-list{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:6px;color:var(--ink-2)} | |
| .prose{padding:clamp(22px,4vw,40px);display:flex;flex-direction:column;gap:16px;max-width:none} | |
| .prose > *{max-width:42em} | |
| .prose h2{font-size:24px;margin-top:12px} | |
| .prose h3{font-size:19px} | |
| .prose ul,.prose ol{margin:0;padding-left:1.4em;display:flex;flex-direction:column;gap:6px} | |
| .prose table{border-collapse:collapse;width:100%;font-size:15px} | |
| .prose th,.prose td{border-bottom:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top} | |
| .help-box{background:var(--warn-bg);border-radius:var(--r-lg);padding:18px 20px;display:flex;flex-direction:column;gap:6px;color:var(--ink)} | |
| .help-box h2{font-size:20px} | |
| .help-box strong{color:var(--warn-fg)} | |
| .table-scroll{overflow-x:auto;max-width:100%} | |
| .data-table{border-collapse:collapse;width:100%;font-size:15px;min-width:520px} | |
| .data-table th,.data-table td{border-bottom:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top} | |
| .data-table th{font-size:13px;color:var(--muted);font-weight:600} | |
| .data-table th.row-head{font-size:15px;color:var(--ink)} | |
| .cell-note{font-size:13px;color:var(--muted)} | |
| .updated{font-size:13px;color:var(--muted)} | |
| /* มือถือ */ | |
| @media (max-width:600px){ | |
| .hero-main{min-height:0;gap:18px} | |
| .hero-foot{padding-top:18px} | |
| .event{min-height:0} | |
| /* แผงวันนี้แสดงกำหนดการถัดไป 2 รายการ รายการครบอยู่ในหน้าต่างกำหนดการ */ | |
| .next-list li:nth-child(n+3){display:none} | |
| } | |
| @media (max-width:420px){.hero h1{font-size:28px}} | |
| /* ปิดการเคลื่อนไหวเมื่อผู้ใช้ตั้งค่าไว้ */ | |
| @media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.lift,.lift:hover{transition:none;transform:none}.pulse::after{animation:none}} | |