Add 3-mode theme system (light / dark / auto by device clock) and tokenize colors

- theme.css: semantic tokens (bg, surface, ink, border, brand, tints, status, glass)
- ThemeSwitch.tsx: radiogroup with light/dark/auto, persisted in localStorage
- auto mode follows device time (06:00-18:00 light), rechecks every minute and on visibilitychange
- inline pre-paint script in layout.tsx prevents flash of wrong theme
- remapped ~250 hardcoded hex declarations across styles to tokens
- fixed --c-ink-2 contrast 4.25 -> 5.36 (WCAG AA) in light mode
- 0 contrast failures below 4.5:1 across 8 pages in both themes
- DESIGN.md: documented theme system
This commit is contained in:
Bkk1234 committed 2026-10-23 23:01:06 +07:00
1 parent 4c444b3d8d
commit 7ac7bf5878
18 files changed
+758 -361

No files matched your search

+48
View File
@@ -115,6 +115,54 @@
- **ชื่อเฉพาะไม่แปล** — ชื่อสถานี จังหวัด สายรถ (ภาษาไทยเสมอ)
- **ตรวจก่อน commit:** `python resource/tools/check-i18n.py`
## 3.2 ธีม (Theme) — สว่าง / มืด / ตามเวลาเครื่อง
**ไฟล์:** `frontend/src/styles/theme.css` (โทเคน) · `frontend/src/components/ThemeSwitch.tsx` (ตัวสลับ)
### โหมดที่รองรับ
| โหมด | ค่า `data-theme` | กติกา |
|---|---|---|
| สว่าง | `light` | ผู้ใช้เลือกเอง |
| มืด | `dark` | ผู้ใช้เลือกเอง |
| ตามเวลา | `auto` | 06:00–17:59 = สว่าง · 18:00–05:59 = มืด (เวลาจากเครื่องผู้ใช้) |
- ค่าเริ่มต้น = `auto` · เก็บที่ `localStorage['at_theme']`
- สคริปต์ inline ใน `src/app/layout.tsx` ตั้ง `data-theme` **ก่อน paint** → ไม่มีจอขาววูบ
- โหมด `auto` ตรวจซ้ำทุก 60 วินาที + ทุกครั้งที่กลับเข้าแท็บ (`visibilitychange`)
- `color-scheme` ถูกตั้งตามธีม → สกรอลบาร์/คอนโทรลเบราว์เซอร์กลมกลืน
### กฎการใช้สี (สำคัญ)
**ห้ามใส่ hex ตรง ๆ ในไฟล์ CSS อีก** — ใช้โทเคนใน `theme.css` เท่านั้น
| โทเคน | สว่าง | มืด | ใช้กับ |
|---|---|---|---|
| `--c-bg` | `#f7f9fd` | `#120e1e` | พื้นหลังหน้า |
| `--c-surface` | `#ffffff` | `#171225` | การ์ด/แถบนำทาง |
| `--c-surface-2` | `#faf7ff` | `#1f1833` | พื้นรอง |
| `--c-surface-3` | `#f4f2fa` | `#251d3d` | พื้นตติยภูมิ |
| `--c-ink` | `#1f2a44` | `#ece9f7` | ข้อความหลัก |
| `--c-ink-2` | `#5f6b83` | `#a9a2c4` | ข้อความรอง |
| `--c-border` | `#e7e2f6` | `#352b52` | เส้นขอบ |
| `--c-brand` | `#7a4cc0` | `#7a4cc0` | พื้นม่วง (คงที่) |
| `--c-brand-ink` | `#7a4cc0` | `#b892f5` | ตัวอักษรม่วง |
| `--c-tint-purple/pink/green/amber/cyan` | อ่อน | เข้มจัด | พื้นตามหมวด |
| `--c-ok/warn/danger/info` | เข้ม | สว่าง | ข้อความสถานะ |
| `--c-glass / -70 / -24` | ขาวโปร่ง | ดำโปร่ง | พื้นผิวโปร่งแสง |
### ตรวจแล้ว (WCAG AA)
- ข้อความบนพื้น: **0 จุดต่ำกว่า 4.5:1** ทั้งโหมดสว่างและมืด (สแกน 8 หน้า)
- ปุ่มธีม 34×34px · **40×40px บนจอสัมผัส** (`@media (pointer: coarse)`)
- `aria-checked` + `role="radiogroup"` + `:focus-visible` 2px
- ไม่มี horizontal overflow ที่ 375px
### ข้อควรระวัง
- แผนที่ (Leaflet) ยังใช้ไทล์สว่าง — ตั้งใจให้เป็นเช่นนั้น (อ่านถนนง่ายกว่า)
- `--c-brand` คงที่ทั้ง 2 ธีม เพื่อรักษาเอกลักษณ์ม่วง; ที่เปลี่ยนคือ `--c-brand-ink` (ตัวอักษร)
## 4. ตัวพิมพ์ (Typography)
```css
+7
View File
@@ -6,6 +6,7 @@ import SiteFooter from "@/components/SiteFooter";
import SiteHeader from "@/components/SiteHeader";
// ลำดับ CSS ต้องตรงกับ mock: shared → map → shell → responsive
import "@/styles/theme.css";
import "@/styles/_shared.css";
import "@/styles/map.css";
import "@/styles/shell.css";
@@ -61,6 +62,12 @@ export default function RootLayout({ children }: { children: React.ReactNode })
{/* theme-color / apple-touch-icon / apple-mobile-web-app-* / mobile-web-app-capable
ถูก emit อัตโนมัติจาก metadata.appleWebApp + metadata.icons + viewport.themeColor
— อย่าใส่ซ้ำที่นี่ (จะได้ meta ซ้ำ 2 ชุด) */}
{/* ตั้งธีมก่อนวาดหน้าจอ (กันจอขาววูบตอนเปิดแอปในโหมดมืด) */}
<script
dangerouslySetInnerHTML={{
__html: `(function(){try{var m=localStorage.getItem('at_theme')||'auto';var h=new Date().getHours();var r=m==='auto'?(h>=6&&h<18?'light':'dark'):m;document.documentElement.dataset.theme=r;document.documentElement.dataset.themeMode=m;document.documentElement.style.colorScheme=r;}catch(e){}})();`,
}}
/>
<script src="/vendor/leaflet/leaflet.js" defer />
</head>
<body className="main-theme-page">
+3
View File
@@ -2,6 +2,7 @@
import { useEffect, useRef } from "react";
import { usePathname } from "next/navigation";
import ThemeSwitch from "@/components/ThemeSwitch";
const NAV = [
{ href: "/", key: "nav.home", label: "หน้าแรก" },
@@ -104,6 +105,8 @@ export default function SiteHeader() {
</div>
</details>
<ThemeSwitch />
<div className="mu-lang-switch" role="group" aria-label="ภาษา / Language">
<button type="button" className="mu-lang-btn" data-i18n-switch="th">
ไทย
+145
View File
@@ -0,0 +1,145 @@
/**
* Atroute — ตัวสลับธีม 3 โหมด
*
* light = สว่าง
* dark = มืด
* auto = ตามเวลาเครื่องโทรศัพท์ (06:00–18:00 สว่าง, นอกนั้นมืด)
*
* หลักการ
* - เก็บค่าที่ localStorage 'at_theme' ({ mode, at })
* - ตั้ง <html data-theme="light|dark"> ให้ CSS ใน theme.css ทำงาน
* - โหมด auto ตรวจซ้ำทุก 1 นาที + ทุกครั้งที่กลับเข้าแอป (visibilitychange)
* จึงเปลี่ยนเองแม้ผู้ใช้เปิดแอปค้างไว้ข้ามช่วงหัวค่ำ
* - กันจอขาววูบ: มีสคริปต์ inline ใน layout.tsx ที่ตั้ง data-theme ก่อน paint
*
* ค่า default ของเครื่องนี้: auto
*/
"use client";
import { useCallback, useEffect, useState } from "react";
export type ThemeMode = "light" | "dark" | "auto";
const LS_KEY = "at_theme";
const DAY_START = 6; // 06:00
const DAY_END = 18; // 18:00
/** เวลาที่ใช้ตัดสิน: 06:00–17:59 = สว่าง, 18:00–05:59 = มืด */
export function themeForNow(d = new Date()): "light" | "dark" {
const h = d.getHours();
return h >= DAY_START && h < DAY_END ? "light" : "dark";
}
function readMode(): ThemeMode {
try {
const v = localStorage.getItem(LS_KEY);
if (v === "light" || v === "dark" || v === "auto") return v;
} catch {
/* localStorage ปิด */
}
return "auto";
}
function applyMode(mode: ThemeMode) {
const resolved = mode === "auto" ? themeForNow() : mode;
document.documentElement.dataset.theme = resolved;
document.documentElement.style.colorScheme = resolved;
// ให้ CSS รู้ว่ากำลังใช้โหมดไหน (สำหรับไอคอน active)
document.documentElement.dataset.themeMode = mode;
}
const LABEL: Record<ThemeMode, string> = {
light: "สว่าง",
dark: "มืด",
auto: "ตามเวลา",
};
function Icon({ mode }: { mode: ThemeMode }) {
const common = {
viewBox: "0 0 24 24",
width: 18,
height: 18,
fill: "none",
stroke: "currentColor",
strokeWidth: 2,
strokeLinecap: "round" as const,
strokeLinejoin: "round" as const,
"aria-hidden": true,
};
if (mode === "light")
return (
<svg {...common}>
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M6.3 17.7l-1.4 1.4M19.1 4.9l-1.4 1.4" />
</svg>
);
if (mode === "dark")
return (
<svg {...common}>
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
</svg>
);
return (
<svg {...common}>
<circle cx="12" cy="12" r="9" />
<path d="M12 7v5l3 2" />
</svg>
);
}
export default function ThemeSwitch() {
const [mode, setMode] = useState<ThemeMode>("auto");
/* อ่านค่าที่เก็บไว้หลัง mount (กัน hydration mismatch) */
useEffect(() => {
const m = readMode();
setMode(m);
applyMode(m);
}, []);
const choose = useCallback((m: ThemeMode) => {
setMode(m);
try {
localStorage.setItem(LS_KEY, m);
} catch {
/* เพิกเฉย */
}
applyMode(m);
}, []);
/* โหมด auto: ตรวจเวลาซ้ำทุกนาที + ตอนกลับเข้าแอป */
useEffect(() => {
if (mode !== "auto") return;
const tick = () => applyMode("auto");
const id = window.setInterval(tick, 60_000);
const onVisible = () => {
if (!document.hidden) tick();
};
document.addEventListener("visibilitychange", onVisible);
return () => {
window.clearInterval(id);
document.removeEventListener("visibilitychange", onVisible);
};
}, [mode]);
const modes: ThemeMode[] = ["light", "dark", "auto"];
return (
<div className="mu-theme-switch" role="radiogroup" aria-label="ธีม / Theme">
{modes.map((m) => (
<button
key={m}
type="button"
role="radio"
aria-checked={mode === m}
aria-label={LABEL[m]}
title={LABEL[m]}
className={"mu-theme-btn" + (mode === m ? " active" : "")}
onClick={() => choose(m)}
>
<Icon mode={m} />
</button>
))}
</div>
);
}
+81 -27
View File
@@ -20,7 +20,7 @@
.mu-cover {
position: relative;
aspect-ratio: 16 / 10;
background: linear-gradient(135deg, #eef1ff 0%, #f7f0ff 100%);
background: linear-gradient(135deg, var(--c-tint-purple) 0%, var(--c-tint-purple) 100%);
overflow: hidden;
}
.mu-cover > img {
@@ -56,8 +56,8 @@
font-size: .72rem;
font-weight: 800;
letter-spacing: .02em;
background: rgba(255, 255, 255, .92);
color: #1f2a44;
background: var(--c-glass);
color: var(--c-ink);
backdrop-filter: blur(8px);
box-shadow: 0 4px 10px rgba(15, 23, 42, .15);
}
@@ -84,12 +84,12 @@
.mu-cover.no-photo {
background:
radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .35), transparent 55%),
linear-gradient(135deg, #7a4cc0 0%, #3071b8 100%);
linear-gradient(135deg, var(--c-brand) 0%, #3071b8 100%);
}
.mu-cover.no-photo::after {
background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, .35) 100%);
}
.mu-cover.tone-purple { background: linear-gradient(135deg, #7a4cc0, #c084fc); }
.mu-cover.tone-purple { background: linear-gradient(135deg, var(--c-brand), #c084fc); }
.mu-cover.tone-sky { background: linear-gradient(135deg, #3071b8, #60a5fa); }
.mu-cover.tone-pink { background: linear-gradient(135deg, #bb3a78, #f472b6); }
.mu-cover.tone-mint { background: linear-gradient(135deg, #1f8765, #34d399); }
@@ -146,17 +146,17 @@
border-radius: 999px;
font-size: .7rem;
font-weight: 700;
background: rgba(255, 255, 255, .92);
color: #1f2a44;
background: var(--c-glass);
color: var(--c-ink);
backdrop-filter: blur(6px);
box-shadow: 0 4px 10px rgba(15, 23, 42, .14);
}
.mu-card-head.no-photo {
background:
radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .25), transparent 55%),
linear-gradient(135deg, #7a4cc0 0%, #3071b8 100%);
linear-gradient(135deg, var(--c-brand) 0%, #3071b8 100%);
}
.mu-card-head.no-photo.bg-purple { background: linear-gradient(135deg, #7a4cc0, #c084fc); }
.mu-card-head.no-photo.bg-purple { background: linear-gradient(135deg, var(--c-brand), #c084fc); }
.mu-card-head.no-photo.bg-sky { background: linear-gradient(135deg, #3071b8, #60a5fa); }
.mu-card-head.no-photo.bg-pink { background: linear-gradient(135deg, #bb3a78, #f472b6); }
.mu-card-head.no-photo.bg-mint { background: linear-gradient(135deg, #1f8765, #34d399); }
@@ -169,7 +169,7 @@
overflow: hidden;
box-shadow: 0 10px 24px rgba(63, 43, 94, .08);
border: 1px solid rgba(231, 224, 246, .95);
background: #fff;
background: var(--c-surface);
display: flex;
flex-direction: column;
transition: transform .18s ease, box-shadow .18s ease;
@@ -221,7 +221,7 @@
width: 48px;
height: 48px;
border-radius: 12px;
background: #fff;
background: var(--c-surface);
padding: 4px;
object-fit: contain;
}
@@ -234,7 +234,7 @@
}
.mu-footer-brand-row span {
display: block;
color: #9aa3c3;
color: var(--c-info);
font-size: .82rem;
margin-top: 2px;
}
@@ -273,7 +273,7 @@
.mu-footer-col ul a:hover { color: #fff; }
.mu-footer-col ul a::before {
content: "›";
color: #7a4cc0;
color: var(--c-brand-ink);
font-weight: 800;
}
.mu-footer-contact a,
@@ -301,7 +301,7 @@
}
.mu-footer-sponsors p.lead {
margin: 0 0 18px;
color: #9aa3c3;
color: var(--c-info);
font-size: .85rem;
line-height: 1.5;
}
@@ -311,7 +311,7 @@
gap: 12px;
}
.mu-sponsor-tile {
background: #fff;
background: var(--c-surface);
border-radius: 12px;
padding: 14px;
display: flex;
@@ -343,7 +343,7 @@
}
.mu-footer-bottom p {
margin: 0;
color: #8d96b8;
color: var(--c-info);
font-size: .82rem;
letter-spacing: .02em;
}
@@ -398,7 +398,7 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
.mu-search-field .ic {
position: absolute;
left: 12px;
color: #6f7b95;
color: var(--c-ink-2);
pointer-events: none;
}
.mu-search-field input {
@@ -411,7 +411,7 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
display: inline-flex;
align-items: center;
gap: 2px;
background: #f0edf7;
background: var(--c-tint-purple);
border: 1px solid #e4dcf2;
border-radius: 999px;
padding: 3px;
@@ -420,7 +420,7 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
.mu-lang-btn {
border: 0;
background: transparent;
color: #6d28d9;
color: var(--c-brand-ink);
font-family: inherit;
font-weight: 700;
font-size: .72rem;
@@ -430,13 +430,67 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
cursor: pointer;
transition: background .15s ease, color .15s ease;
}
.mu-lang-btn:hover { color: #5b21b6; }
.mu-lang-btn:hover { color: var(--c-brand-ink); }
.mu-lang-btn.active {
background: #fff;
color: #7a4cc0;
background: var(--c-surface);
color: var(--c-brand-ink);
box-shadow: 0 1px 4px rgba(63, 43, 94, .18);
}
/* ---------- ตัวสลับธีม (สว่าง / มืด / ตามเวลา) ---------- */
.mu-theme-switch {
display: inline-flex;
align-items: center;
gap: 2px;
background: var(--c-tint-purple);
border: 1px solid #e4dcf2;
border-radius: 999px;
padding: 3px;
flex-shrink: 0;
}
.mu-theme-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
min-width: 34px;
border: 0;
border-radius: 999px;
background: transparent;
color: var(--c-brand-ink);
cursor: pointer;
transition: background .15s ease, color .15s ease;
}
.mu-theme-btn:hover { color: var(--c-brand-ink); }
.mu-theme-btn.active {
background: var(--c-surface);
color: var(--c-brand-ink);
box-shadow: 0 1px 4px rgba(63, 43, 94, .18);
}
/* โฟกัสคีย์บอร์ดต้องเห็นชัด (WCAG 2.4.7) */
.mu-theme-btn:focus-visible,
.mu-lang-btn:focus-visible {
outline: 2px solid var(--c-focus);
outline-offset: 2px;
}
:root[data-theme="dark"] .mu-theme-switch,
:root[data-theme="dark"] .mu-lang-switch {
background: var(--c-surface-3);
border-color: var(--c-border);
}
:root[data-theme="dark"] .mu-theme-btn,
:root[data-theme="dark"] .mu-lang-btn { color: var(--c-ink-2); }
:root[data-theme="dark"] .mu-theme-btn:hover,
:root[data-theme="dark"] .mu-lang-btn:hover { color: var(--c-ink); }
:root[data-theme="dark"] .mu-lang-btn { background: transparent; }
/* จอสัมผัส: ขยายเป้ากดให้ถึง 44px (WCAG 2.5.5) */
@media (pointer: coarse) {
.mu-theme-btn { width: 40px; height: 40px; min-width: 40px; }
.mu-theme-switch { padding: 2px; }
}
/* ============================================================
ปุ่ม + ฟอร์มคอนโทรล (shared — ทุกหน้าใช้ร่วมกัน)
.mu-btn อยู่ที่นี่ (ไม่ใช่ใน partial) → หน้าไหนก็ได้สไตล์เดียวกัน
@@ -466,12 +520,12 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
}
.mu-btn.primary:hover { box-shadow: 0 10px 22px rgba(124, 58, 237, .35); }
.mu-btn.ghost {
background: #fff;
border-color: #e7e2f6;
color: #5b3b71;
background: var(--c-surface);
border-color: var(--c-border);
color: var(--c-brand-ink);
box-shadow: 0 2px 8px rgba(63, 43, 94, .05);
}
.mu-btn.ghost:hover { border-color: #d8c9f2; background: #faf7ff; }
.mu-btn.ghost:hover { border-color: #d8c9f2; background: var(--c-surface-2); }
/* select แบบโมเดิร์น — custom chevron แทนลูกศร native (prefix #view ชนะ partial style) */
#view .mu-toolbar select {
@@ -490,7 +544,7 @@ body:has(.mu-site-footer) .mu-footer { display: none; }
#view .mu-toolbar input:focus-visible,
#view .mu-toolbar select:focus-visible,
#view .mu-toolbar .mu-btn:focus-visible {
outline: 2px solid #7a4cc0;
outline: 2px solid var(--c-brand-ink);
outline-offset: 2px;
}
+34 -34
View File
@@ -11,22 +11,22 @@
height: 300px;
border: 1px solid #ddd5c0;
border-radius: 8px;
background: #f7f1e2; /* --paper — พื้นตอน tile ยังไม่มา/ออฟไลน์ */
background: var(--c-tint-amber); /* --paper — พื้นตอน tile ยังไม่มา/ออฟไลน์ */
overflow: hidden;
}
.at-map.is-offline { background: repeating-linear-gradient(45deg, #f7f1e2 0 12px, #f2ebd8 12px 24px); }
.at-map.is-offline { background: repeating-linear-gradient(45deg, var(--c-tint-amber) 0 12px, var(--c-tint-amber) 12px 24px); }
.at-map .leaflet-container { background: transparent; font-family: inherit; }
/* ปุ่ม zoom — ให้เข้าธีม (ขอบบาง ไม่มีเงา) */
.at-map .leaflet-control-zoom a {
border-radius: 4px;
border: 1px solid #ddd5c0;
background: #fffdf6;
color: #14211a;
background: var(--c-tint-amber);
color: var(--c-ok);
font-weight: 700;
box-shadow: none;
}
.at-map .leaflet-control-zoom a:hover { background: #e4efe4; color: #14532d; }
.at-map .leaflet-control-zoom a:hover { background: var(--c-tint-green); color: var(--c-ok); }
.at-map .leaflet-bar { border: 0; box-shadow: none; }
/* attribution — เล็ก อ่านได้ ไม่ทับข้อมูล */
@@ -34,7 +34,7 @@
background: rgba(255, 253, 246, .88);
border-top-left-radius: 4px;
font-size: .68rem;
color: #6b7268;
color: var(--c-ink-2);
}
/* ---------- หมุด: สี่เหลี่ยมมน (ไม่ใช่หยดน้ำ ไม่มีเงา) ---------- */
@@ -52,18 +52,18 @@
/* ป้ายที่กำลังเปิดดูอยู่ — ใหญ่กว่าเพื่อให้เห็นชัด */
.at-pin.here { background: #f2a900; width: 18px; height: 18px; border-width: 3px; }
/* จุดย่อย (จุดขึ้นรถประจำทางอื่นๆ) — สี่เหลี่ยมม่วง ต่างจากหมุดกลม */
.at-pin.sub { background: #7a4cc0; border-radius: 2px; }
.at-pin.sub { background: var(--c-brand); border-radius: 2px; }
.at-map .leaflet-tooltip {
border-radius: 4px;
border: 1px solid #ddd5c0;
background: #fffdf6;
color: #14211a;
background: var(--c-tint-amber);
color: var(--c-ok);
box-shadow: none;
font-size: .78rem;
padding: 5px 8px;
}
.at-map .leaflet-tooltip b { color: #14532d; }
.at-map .leaflet-tooltip b { color: var(--c-ok); }
/* ---------- legend (มุมซ้ายล่าง) ---------- */
.at-legend {
@@ -75,7 +75,7 @@
border-radius: 4px;
padding: 7px 10px;
font-size: .74rem;
color: #14211a;
color: var(--c-ok);
line-height: 1.65;
pointer-events: none;
}
@@ -91,11 +91,11 @@
/* ---------- caption ใต้แผนที่ ---------- */
.at-map-caption {
margin: 9px 0 0;
color: #6b7268;
color: var(--c-ink-2);
font-size: .82rem;
}
.at-map-caption b { color: #14211a; }
.at-map-caption .at-offline { color: #8a6100; }
.at-map-caption b { color: var(--c-ok); }
.at-map-caption .at-offline { color: var(--c-warn); }
@media (min-width: 768px) {
.at-map { height: 380px; }
@@ -105,45 +105,45 @@
.at-map .leaflet-popup-content-wrapper {
border-radius: 4px;
border: 1px solid #ddd5c0;
background: #fffdf6;
background: var(--c-tint-amber);
box-shadow: none;
color: #14211a;
color: var(--c-ok);
}
.at-map .leaflet-popup-tip { background: #fffdf6; box-shadow: none; }
.at-map .leaflet-popup-tip { background: var(--c-tint-amber); box-shadow: none; }
.at-map .leaflet-popup-content { margin: 10px 12px; font-size: .8rem; }
.at-pop { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.at-pop b { font-size: .86rem; color: #14532d; }
.at-pop span { color: #6b7268; }
.at-pop a { margin-top: 4px; color: #14532d; font-weight: 700; text-decoration: none; border-bottom: 1px solid #1f7a3d; align-self: flex-start; }
.at-pop a:hover { color: #1f7a3d; }
.at-pop b { font-size: .86rem; color: var(--c-ok); }
.at-pop span { color: var(--c-ink-2); }
.at-pop a { margin-top: 4px; color: var(--c-ok); font-weight: 700; text-decoration: none; border-bottom: 1px solid #1f7a3d; align-self: flex-start; }
.at-pop a:hover { color: var(--c-ok); }
/* ---------- รายการจุดจอดตามเส้นทาง + กม. จากต้นทาง ---------- */
.at-km-wrap { margin-top: 14px; border-top: 1px solid #ddd5c0; padding-top: 12px; }
.at-km-wrap > h3 { margin: 0 0 8px; font-size: .9rem; font-weight: 800; color: #14211a; }
.at-km-wrap > h3 { margin: 0 0 8px; font-size: .9rem; font-weight: 800; color: var(--c-ok); }
.at-km-wrap ul { list-style: none; margin: 0; padding: 0; }
.at-km-wrap li + li { border-top: 1px dashed #ddd5c0; }
.at-km-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; text-decoration: none; color: #14211a; font-size: .86rem; }
.at-km-row:hover .at-km-name { color: #1f7a3d; text-decoration: underline; }
.at-km-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; text-decoration: none; color: var(--c-ok); font-size: .86rem; }
.at-km-row:hover .at-km-name { color: var(--c-ok); text-decoration: underline; }
.at-km-dot { width: 9px; height: 9px; border-radius: 3px; background: #f2a900; flex: none; }
.at-km-name { flex: 1; font-weight: 600; }
.at-km-val { font-variant-numeric: tabular-nums; font-weight: 700; color: #14532d; }
.at-km-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--c-ok); }
/* จุดจอดที่ไม่มีหน้ารายละเอียด (มาจาก 8 other_stop.json) — ไม่ใช่ลิงก์ */
.at-km-row.is-plain { cursor: default; }
.at-km-row.is-plain .at-km-dot { background: #7a4cc0; }
.at-km-row.is-sub .at-km-dot { background: #7a4cc0; } /* จุดย่อย (จุดขึ้นรถอื่นๆ) — ม่วง ให้ตรงกับหมุดบนแผนที่ */
.at-km-row.is-plain .at-km-dot { background: var(--c-brand); }
.at-km-row.is-sub .at-km-dot { background: var(--c-brand); } /* จุดย่อย (จุดขึ้นรถอื่นๆ) — ม่วง ให้ตรงกับหมุดบนแผนที่ */
.at-km-row.is-plain:hover .at-km-name { color: inherit; text-decoration: none; }
.at-km-row .at-km-val.is-off { color: #a3560f; font-weight: 600; font-size: .78rem; }
.at-km-row .at-km-val.is-off { color: var(--c-warn); font-weight: 600; font-size: .78rem; }
/* ---------- ป้ายใกล้ฉัน ---------- */
.at-near-msg { margin: 14px 0 0; color: #6b7268; font-size: .86rem; }
.at-near-err { color: #8a6100; }
.at-near-msg { margin: 14px 0 0; color: var(--c-ink-2); font-size: .86rem; }
.at-near-err { color: var(--c-warn); }
.at-near-list { list-style: none; margin: 12px 0 0; padding: 0; }
.at-near-list li + li { border-top: 1px dashed #ddd5c0; }
.at-near-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 2px; text-decoration: none; color: #14211a; align-items: center; }
.at-near-row:hover .at-near-name { color: #1f7a3d; text-decoration: underline; }
.at-near-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 2px; text-decoration: none; color: var(--c-ok); align-items: center; }
.at-near-row:hover .at-near-name { color: var(--c-ok); text-decoration: underline; }
.at-near-name { font-weight: 700; font-size: .9rem; }
.at-near-meta { grid-column: 1; color: #6b7268; font-size: .76rem; }
.at-near-dist { grid-column: 2; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; font-weight: 800; color: #14532d; white-space: nowrap; }
.at-near-meta { grid-column: 1; color: var(--c-ink-2); font-size: .76rem; }
.at-near-dist { grid-column: 2; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--c-ok); white-space: nowrap; }
/* ---------- กัน CSS ภายนอกทำลายขนาด SVG ของ Leaflet ----------
responsive.css ตั้ง `img, svg, video { max-width: 100%; height: auto; }` และบาง partial
+7 -7
View File
@@ -3,7 +3,7 @@
.mu-hero-lead {
margin: 14px auto 0;
max-width: 640px;
color: #5b3b71;
color: var(--c-brand-ink);
font-size: .95rem;
}
@@ -15,8 +15,8 @@
grid-template-columns: 1fr;
gap: 16px;
align-items: center;
background: #fff;
border: 1px solid #ebe8f4;
background: var(--c-surface);
border: 1px solid var(--c-border-2);
border-radius: 18px;
padding: 16px;
box-shadow: 0 10px 26px rgba(63, 43, 94, .07);
@@ -31,12 +31,12 @@
display: block;
box-shadow: 0 10px 24px rgba(63, 43, 94, .14);
}
.mu-about-block h2 { margin: 0 0 10px; font-size: 1.2rem; color: #1f2a44; font-weight: 800; line-height: 1.35; }
.mu-about-block p { margin: 0 0 10px; color: #4a5568; font-size: .95rem; line-height: 1.8; }
.mu-about-block h2 { margin: 0 0 10px; font-size: 1.2rem; color: var(--c-ink); font-weight: 800; line-height: 1.35; }
.mu-about-block p { margin: 0 0 10px; color: var(--c-ink-2); font-size: .95rem; line-height: 1.8; }
.mu-about-block p:last-child { margin-bottom: 0; }
.mu-about-skeleton { color: #6f7b95; font-size: .9rem; text-align: center; padding: 18px 0; }
.mu-about-skel-card { height: 180px; border-radius: 18px; background: linear-gradient(90deg, #f4f2fa 25%, #ece8f6 37%, #f4f2fa 63%); background-size: 400% 100%; animation: muSkel 1.4s ease infinite; }
.mu-about-skeleton { color: var(--c-ink-2); font-size: .9rem; text-align: center; padding: 18px 0; }
.mu-about-skel-card { height: 180px; border-radius: 18px; background: linear-gradient(90deg, var(--c-surface-3) 25%, var(--c-tint-purple) 37%, var(--c-surface-3) 63%); background-size: 400% 100%; animation: muSkel 1.4s ease infinite; }
@keyframes muSkel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
/* แท็บเล็ต/เดสก์ท็อป: 2 คอลัมน์ + สลับข้าง (คี่ = ข้อความซ้าย, คู่ = รูปซ้าย) */
+46 -46
View File
@@ -3,7 +3,7 @@
.mu-hero-lead {
margin: 14px auto 0;
max-width: 640px;
color: #5b3b71;
color: var(--c-brand-ink);
font-size: .95rem;
}
@@ -17,12 +17,12 @@
gap: 12px;
margin-bottom: 18px;
}
.mu-blog-count { margin: 0; color: #6f7b95; font-size: .88rem; }
.mu-blog-count { margin: 0; color: var(--c-ink-2); font-size: .88rem; }
.mu-view-switch {
margin-left: auto;
display: inline-flex;
gap: 2px;
background: #f0edf7;
background: var(--c-tint-purple);
border: 1px solid #e4dcf2;
border-radius: 999px;
padding: 3px;
@@ -33,7 +33,7 @@
gap: 6px;
border: 0;
background: transparent;
color: #6d28d9;
color: var(--c-brand-ink);
font-family: inherit;
font-weight: 700;
font-size: .8rem;
@@ -44,8 +44,8 @@
transition: background .15s ease, color .15s ease;
}
.mu-view-btn .ic { width: 15px; height: 15px; }
.mu-view-btn.active { background: #fff; color: #7a4cc0; box-shadow: 0 1px 4px rgba(63, 43, 94, .18); }
.mu-view-btn:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 2px; }
.mu-view-btn.active { background: var(--c-surface); color: var(--c-brand-ink); box-shadow: 0 1px 4px rgba(63, 43, 94, .18); }
.mu-view-btn:focus-visible { outline: 2px solid var(--c-brand-ink); outline-offset: 2px; }
/* --- โหมดตาราง (grid) --- */
#blog-list.mode-grid {
@@ -56,8 +56,8 @@
.mu-blog-card {
display: flex;
flex-direction: column;
background: #fff;
border: 1px solid #ebe8f4;
background: var(--c-surface);
border: 1px solid var(--c-border-2);
border-radius: 18px;
overflow: hidden;
box-shadow: 0 10px 26px rgba(63, 43, 94, .07);
@@ -67,14 +67,14 @@
}
.mu-blog-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(63, 43, 94, .14); }
.mu-blog-card .mu-cover { aspect-ratio: 16 / 9; }
.mu-blog-card .mu-cover.no-img { background: linear-gradient(135deg, #7a4cc0, #3071b8); }
.mu-blog-card .mu-cover.no-img { background: linear-gradient(135deg, var(--c-brand), #3071b8); }
.mu-blog-card .mu-cover.no-img::after { background: linear-gradient(180deg, rgba(15,23,42,0) 40%, rgba(15,23,42,.4) 100%); }
.mu-blog-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mu-blog-meta { display: flex; align-items: center; gap: 8px; color: #6f7b95; font-size: .78rem; }
.mu-blog-meta { display: flex; align-items: center; gap: 8px; color: var(--c-ink-2); font-size: .78rem; }
.mu-blog-meta time { font-variant-numeric: tabular-nums; }
.mu-blog-card h2 { margin: 0; font-size: 1.02rem; color: #1f2a44; font-weight: 800; line-height: 1.4; }
.mu-blog-excerpt { margin: 0; color: #4a5568; font-size: .88rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mu-blog-more { margin-top: auto; padding-top: 6px; color: #7a4cc0; font-weight: 700; font-size: .85rem; }
.mu-blog-card h2 { margin: 0; font-size: 1.02rem; color: var(--c-ink); font-weight: 800; line-height: 1.4; }
.mu-blog-excerpt { margin: 0; color: var(--c-ink-2); font-size: .88rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mu-blog-more { margin-top: auto; padding-top: 6px; color: var(--c-brand-ink); font-weight: 700; font-size: .85rem; }
/* --- โหมดรายการ (list) --- */
#blog-list.mode-list { display: flex; flex-direction: column; gap: 14px; }
@@ -83,8 +83,8 @@
grid-template-columns: 108px 1fr;
gap: 14px;
align-items: center;
background: #fff;
border: 1px solid #ebe8f4;
background: var(--c-surface);
border: 1px solid var(--c-border-2);
border-radius: 16px;
padding: 12px;
box-shadow: 0 8px 20px rgba(63, 43, 94, .06);
@@ -98,16 +98,16 @@
border-radius: 12px;
object-fit: cover;
display: block;
background: linear-gradient(135deg, #7a4cc0, #3071b8);
background: linear-gradient(135deg, var(--c-brand), #3071b8);
}
.mu-blog-row h2 { margin: 4px 0 6px; font-size: .98rem; color: #1f2a44; font-weight: 800; line-height: 1.4; }
.mu-blog-row h2 { margin: 4px 0 6px; font-size: .98rem; color: var(--c-ink); font-weight: 800; line-height: 1.4; }
.mu-blog-row .mu-blog-excerpt { -webkit-line-clamp: 2; }
.mu-blog-empty { color: #6f7b95; text-align: center; padding: 34px 0; }
.mu-blog-skel { height: 220px; border-radius: 18px; background: linear-gradient(90deg, #f4f2fa 25%, #ece8f6 37%, #f4f2fa 63%); background-size: 400% 100%; animation: muSkelB 1.4s ease infinite; }
.mu-blog-empty { color: var(--c-ink-2); text-align: center; padding: 34px 0; }
.mu-blog-skel { height: 220px; border-radius: 18px; background: linear-gradient(90deg, var(--c-surface-3) 25%, var(--c-tint-purple) 37%, var(--c-surface-3) 63%); background-size: 400% 100%; animation: muSkelB 1.4s ease infinite; }
@keyframes muSkelB { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
/* --- หน้าอ่านบทความ --- */
.mu-post { background: #fff; border: 1px solid #ebe8f4; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 30px rgba(63, 43, 94, .08); }
.mu-post { background: var(--c-surface); border: 1px solid var(--c-border-2); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 30px rgba(63, 43, 94, .08); }
.mu-post .mu-cover { aspect-ratio: 16 / 8; }
/* --- แผนที่เส้นทางแทนรูปปก (textN.json → "map") --- */
@@ -129,7 +129,7 @@
display: inline-flex; align-items: center; gap: 6px;
padding: 5px 10px; border-radius: 999px;
font-size: .72rem; font-weight: 800; letter-spacing: .02em;
background: rgba(255, 255, 255, .92); color: #1f2a44;
background: var(--c-glass); color: var(--c-ink);
backdrop-filter: blur(8px);
box-shadow: 0 4px 10px rgba(15, 23, 42, .15);
pointer-events: none;
@@ -138,7 +138,7 @@
.blog-mapx-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.blog-mapx-group {
margin: 10px 0 2px; font-size: .78rem; font-weight: 700; letter-spacing: .01em;
color: #7a4cc0; list-style: none;
color: var(--c-brand-ink); list-style: none;
}
.blog-mapx-group:first-child { margin-top: 0; }
.blog-mapx-group::before { content: ''; display: inline-block; width: 14px; height: 2px;
@@ -146,59 +146,59 @@
.blog-mapx-row {
display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
padding: 9px 11px; border: 1px solid #e8e4f2; border-radius: 12px;
background: #fff; cursor: pointer; font-size: .88rem; color: #3d4a63;
background: var(--c-surface); cursor: pointer; font-size: .88rem; color: var(--c-info);
}
.blog-mapx-row:hover { border-color: #cbb8e8; background: #faf8ff; }
.blog-mapx-row.is-on { border-color: #7a4cc0; background: #f6f2ff; }
.blog-mapx-row:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 1px; }
.blog-mapx-row:hover { border-color: #cbb8e8; background: var(--c-tint-purple); }
.blog-mapx-row.is-on { border-color: #7a4cc0; background: var(--c-tint-purple); }
.blog-mapx-row:focus-visible { outline: 2px solid var(--c-brand-ink); outline-offset: 1px; }
.blog-mapx-sw { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.blog-mapx-nm { font-weight: 700; color: #1f2a44; }
.blog-mapx-ds { color: #6b7a94; }
.blog-mapx-nm { font-weight: 700; color: var(--c-ink); }
.blog-mapx-ds { color: var(--c-ink-2); }
.blog-mapx-ds::before { content: '\00b7'; margin-right: 6px; color: #c9c2dc; }
.blog-mapx-badge {
margin-left: auto; font-size: .72rem; padding: 2px 8px; border-radius: 999px;
background: #fdf4e3; color: #8a6100; border: 1px solid #f0dfb8;
background: var(--c-tint-amber); color: var(--c-warn); border: 1px solid #f0dfb8;
}
.blog-mapx-panel { margin-top: 10px; padding: 12px 14px; border: 1px solid #e8e4f2; border-radius: 14px; background: #fbfaff; }
.blog-mapx-panel { margin-top: 10px; padding: 12px 14px; border: 1px solid #e8e4f2; border-radius: 14px; background: var(--c-surface-2); }
.blog-mapx-panel[hidden] { display: none; }
.blog-mapx-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.blog-mapx-head strong { color: #1f2a44; font-size: .95rem; }
.blog-mapx-line { margin: 4px 0; font-size: .85rem; color: #6b7a94; }
.blog-mapx-head strong { color: var(--c-ink); font-size: .95rem; }
.blog-mapx-line { margin: 4px 0; font-size: .85rem; color: var(--c-ink-2); }
.blog-mapx-line span::after { content: ':'; margin-right: 6px; }
.blog-mapx-line b { color: #1f2a44; font-weight: 600; }
.blog-mapx-facts { margin: 8px 0 0; font-size: .82rem; color: #7a4cc0; font-weight: 700; }
.blog-mapx-hint { margin: 8px 0 0; font-size: .8rem; color: #8b93a7; }
.blog-mapx-src { margin: 0 0 14px; font-size: .78rem; color: #8b93a7; word-break: break-all; }
.blog-mapx-line b { color: var(--c-ink); font-weight: 600; }
.blog-mapx-facts { margin: 8px 0 0; font-size: .82rem; color: var(--c-brand-ink); font-weight: 700; }
.blog-mapx-hint { margin: 8px 0 0; font-size: .8rem; color: var(--c-ink-2); }
.blog-mapx-src { margin: 0 0 14px; font-size: .78rem; color: var(--c-ink-2); word-break: break-all; }
.at-tip-org { background: #1f2a44; color: #fff; border: 0; font-weight: 700; }
@media (min-width: 768px) { .blog-mapx-map { height: 380px; } }
.mu-cover-note {
position: absolute; left: 12px; bottom: 12px; z-index: 500;
padding: 4px 10px; border-radius: 999px; font-size: .78rem;
background: rgba(255, 255, 255, .9); color: #8a6100; border: 1px solid #f0d9a8;
background: rgba(255, 255, 255, .9); color: var(--c-warn); border: 1px solid #f0d9a8;
}
.mu-post-body { padding: 20px 18px 26px; }
.mu-post-body h1 { margin: 6px 0 12px; font-size: 1.35rem; color: #1f2a44; font-weight: 800; line-height: 1.4; }
.mu-post-body h1 { margin: 6px 0 12px; font-size: 1.35rem; color: var(--c-ink); font-weight: 800; line-height: 1.4; }
/* ย่อหน้า: เว้นระยะ 20px + ย่อหน้าหน้าบรรทัด 1.5em (แบบหนังสือไทย) */
.mu-post-body p { margin: 0 0 20px; color: #4a5568; font-size: .96rem; line-height: 1.9; text-indent: 1.5em; }
.mu-post-body p { margin: 0 0 20px; color: var(--c-ink-2); font-size: .96rem; line-height: 1.9; text-indent: 1.5em; }
.mu-post-body p:last-child { margin-bottom: 0; }
/* ย่อหน้าที่เป็นรูป/บรรทัดข้อมูลไม่ต้องย่อหน้า */
.mu-post-body p.mu-post-figure, .mu-post-figure, .mu-post-body p:empty { text-indent: 0; }
/* มาร์กดาวน์เบา ๆ ในเนื้อหา (จาก textN.json) */
.mu-post-body strong { color: #1f2a44; font-weight: 800; }
.mu-post-body strong { color: var(--c-ink); font-weight: 800; }
.mu-post-body em { font-style: italic; }
.mu-post-body a { color: #7a4cc0; font-weight: 700; text-decoration: none; border-bottom: 1px solid #d9cbf3; }
.mu-post-body a { color: var(--c-brand-ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid #d9cbf3; }
.mu-post-body a:hover { border-bottom-color: #7a4cc0; }
.mu-post-body code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .88em;
background: #f4f1fb; border: 1px solid #e7e0f6; border-radius: 4px; padding: 1px 5px; color: #5b4a80; }
background: var(--c-tint-purple); border: 1px solid var(--c-border); border-radius: 4px; padding: 1px 5px; color: var(--c-brand-ink); }
.mu-post-body ul { margin: 0 0 20px; padding-left: 20px; }
.mu-post-body li { color: #4a5568; font-size: .96rem; line-height: 1.9; margin-bottom: 4px; }
.mu-post-body li { color: var(--c-ink-2); font-size: .96rem; line-height: 1.9; margin-bottom: 4px; }
.mu-post-figure { margin: 4px 0 16px; }
.mu-post-figure img { width: 100%; height: auto; border-radius: 10px; border: 1px solid #e7e0f6; display: block; }
.mu-post-figure figcaption { margin-top: 6px; color: #6f7b95; font-size: .82rem; text-align: center; }
.mu-post-figure img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--c-border); display: block; }
.mu-post-figure figcaption { margin-top: 6px; color: var(--c-ink-2); font-size: .82rem; text-align: center; }
.mu-post-back {
display: inline-flex; align-items: center; gap: 6px;
margin-bottom: 16px; color: #7a4cc0; font-weight: 700;
margin-bottom: 16px; color: var(--c-brand-ink); font-weight: 700;
text-decoration: none; font-size: .9rem;
}
.mu-post-back:hover { text-decoration: underline; }
+10 -10
View File
@@ -10,7 +10,7 @@
.mu-hero-lead {
margin: 14px auto 0;
max-width: 640px;
color: #5b3b71;
color: var(--c-brand-ink);
font-size: .95rem;
}
@@ -26,7 +26,7 @@
gap: 14px;
}
.mu-stop-card {
background: #fff;
background: var(--c-surface);
border-radius: 16px;
overflow: hidden;
box-shadow: 0 4px 14px rgba(20, 40, 90, .06);
@@ -47,7 +47,7 @@
padding: 14px 16px;
color: #fff;
}
.mu-stop-head.tone-purple { background: linear-gradient(135deg, #7a4cc0 0%, #b07ce0 100%); }
.mu-stop-head.tone-purple { background: linear-gradient(135deg, var(--c-brand) 0%, #b07ce0 100%); }
.mu-stop-head.tone-sky { background: linear-gradient(135deg, #3071b8 0%, #6ea7e8 100%); }
.mu-stop-head.tone-mint { background: linear-gradient(135deg, #1f8765 0%, #51c39c 100%); }
.mu-stop-head.tone-pink { background: linear-gradient(135deg, #bb3a78 0%, #f08bb9 100%); }
@@ -58,7 +58,7 @@
gap: 6px;
padding: 5px 12px;
border-radius: 999px;
background: rgba(255, 255, 255, .24);
background: var(--c-glass-24);
font-size: .74rem;
font-weight: 700;
white-space: nowrap;
@@ -70,9 +70,9 @@
.mu-stop-card[open] > summary .mu-stop-chevron { transform: rotate(180deg); }
.mu-stop-body { padding: 16px; }
.mu-stop-sub { font-weight: 700; color: #1f2a44; margin: 0 0 10px; font-size: .9rem; }
.mu-stop-sub { font-weight: 700; color: var(--c-ink); margin: 0 0 10px; font-size: .9rem; }
.mu-direction-tag {
background: #7a4cc0;
background: var(--c-brand);
color: #fff;
border-radius: 999px;
padding: 3px 10px;
@@ -84,8 +84,8 @@
.mu-time-chip {
padding: 6px 12px;
border-radius: 10px;
background: #f1f4fb;
color: #2b2f42;
background: var(--c-tint-purple);
color: var(--c-ink);
font-weight: 700;
font-size: .85rem;
border: 1px solid #e6eaf3;
@@ -99,11 +99,11 @@
}
.mu-schedule-note {
color: #9a3b6e;
color: var(--c-danger);
font-size: .82rem;
margin: 12px 0 0;
padding: 8px 12px;
background: #fff5f9;
background: var(--c-tint-pink);
border-left: 3px solid #bb3a78;
border-radius: 8px;
display: flex;
+10 -10
View File
@@ -1,16 +1,16 @@
/* Ported from credits.html <style> block */
.mu-page { background: linear-gradient(180deg, #fcfbff 0%, #f5f9ff 100%); }
.mu-page { background: linear-gradient(180deg, var(--c-surface-2) 0%, var(--c-tint-purple) 100%); }
.mu-credit-wrap { max-width: 46rem; margin: 0 auto; padding: 40px 28px 56px; }
.mu-credit-hero { margin-bottom: 28px; }
.mu-credit-hero h1 { margin: 0 0 8px; font-size: 1.9rem; color: #1f2a44; }
.mu-credit-hero p { margin: 0; color: #66728f; }
.mu-credit-hero h1 { margin: 0 0 8px; font-size: 1.9rem; color: var(--c-ink); }
.mu-credit-hero p { margin: 0; color: var(--c-ink-2); }
.mu-credit-section {
background: #fff; border: 1px solid #e7e0f6; border-radius: 16px;
background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px;
padding: 20px 22px; margin-bottom: 16px;
}
.mu-credit-section h2 { margin: 0 0 6px; font-size: 1.05rem; color: #1f2a44; }
.mu-credit-section .src { margin: 0 0 12px; color: #6f7b95; font-size: .85rem; }
.mu-credit-section ul { margin: 0; padding-left: 1.2rem; color: #3a4462; font-size: .92rem; line-height: 1.7; }
.mu-credit-section code { background: #f5eeff; color: #7a4cc0; padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.mu-credit-section a { color: #7a4cc0; }
.mu-license { margin: 14px 0 0; padding: 12px 14px; background: #f9f7ff; border-left: 3px solid #7a4cc0; border-radius: 8px; font-size: .85rem; color: #4a5573; line-height: 1.6; }
.mu-credit-section h2 { margin: 0 0 6px; font-size: 1.05rem; color: var(--c-ink); }
.mu-credit-section .src { margin: 0 0 12px; color: var(--c-ink-2); font-size: .85rem; }
.mu-credit-section ul { margin: 0; padding-left: 1.2rem; color: var(--c-info); font-size: .92rem; line-height: 1.7; }
.mu-credit-section code { background: var(--c-tint-purple); color: var(--c-brand-ink); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.mu-credit-section a { color: var(--c-brand-ink); }
.mu-license { margin: 14px 0 0; padding: 12px 14px; background: var(--c-surface-2); border-left: 3px solid #7a4cc0; border-radius: 8px; font-size: .85rem; color: var(--c-ink-2); line-height: 1.6; }
+4 -4
View File
@@ -4,15 +4,15 @@
.mu-share-btn {
display: inline-flex; align-items: center; gap: 8px;
padding: 10px 16px; border: 1px solid #7a4cc0; border-radius: 8px;
background: #7a4cc0; color: #fff; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
background: var(--c-brand); color: #fff; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.mu-share-btn:hover { background: #6a3cae; }
.mu-share-btn:focus-visible { outline: 2px solid #2b2f42; outline-offset: 2px; }
.mu-share-btn .ic { width: 18px; height: 18px; }
.mu-share-status { margin: 0; font-size: .82rem; line-height: 1.7; color: #4b5570; text-align: right; }
.mu-share-status { margin: 0; font-size: .82rem; line-height: 1.7; color: var(--c-ink-2); text-align: right; }
.mu-share-status:empty { display: none; }
.mu-share-url { display: inline-block; padding: 2px 6px; border: 1px solid #e7e2f6; border-radius: 8px; background: #faf9ff; font-size: .8rem; }
.mu-share-line { display: inline-block; margin-left: 6px; font-weight: 700; color: #06c755; text-decoration: none; }
.mu-share-url { display: inline-block; padding: 2px 6px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-tint-purple); font-size: .8rem; }
.mu-share-line { display: inline-block; margin-left: 6px; font-weight: 700; color: var(--c-ok); text-decoration: none; }
.mu-share-line:hover { text-decoration: underline; }
@media (max-width: 560px) {
.mu-share-row { align-items: stretch; }
+31 -31
View File
@@ -7,41 +7,41 @@
.mu-page { padding: 20px 0 48px; }
/* --- header --- */
.mu-breadcrumb { color: #6f7b95; font-size: .88rem; margin: 0 0 12px; }
.mu-breadcrumb a { color: #7a4cc0; text-decoration: none; font-weight: 600; }
.mu-breadcrumb { color: var(--c-ink-2); font-size: .88rem; margin: 0 0 12px; }
.mu-breadcrumb a { color: var(--c-brand-ink); text-decoration: none; font-weight: 600; }
.mu-page-title {
display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
margin: 0 0 16px; font-size: 1.6rem; color: #1f2a44; font-weight: 800; line-height: 1.25;
margin: 0 0 16px; font-size: 1.6rem; color: var(--c-ink); font-weight: 800; line-height: 1.25;
}
.mu-route-chip {
display: inline-flex; align-items: center; justify-content: center;
min-width: 54px; height: 54px; padding: 0 16px; border-radius: 14px;
background: linear-gradient(135deg, #7a4cc0, #b07ce0); color: #fff;
background: linear-gradient(135deg, var(--c-brand), #b07ce0); color: #fff;
font-weight: 800; font-size: 1.35rem; flex: none;
box-shadow: 0 6px 14px rgba(122, 76, 192, .25);
}
/* สีพื้นหลังของเลขสาย เปลี่ยนตามหมวดเส้นทาง (route_groups.json)
น้ำเงิน = เข้ากรุงเทพฯ · ม่วง = ระหว่างจังหวัด · ชมพู = ภายในจังหวัด · เทา = หมวดอื่น/ไม่ระบุ */
.mu-route-chip.grp-bangkok { background: linear-gradient(135deg, #1a53a8, #3f82d8); box-shadow: 0 6px 14px rgba(31, 95, 191, .25); }
.mu-route-chip.grp-interprovincial { background: linear-gradient(135deg, #7a4cc0, #b07ce0); box-shadow: 0 6px 14px rgba(122, 76, 192, .25); }
.mu-route-chip.grp-interprovincial { background: linear-gradient(135deg, var(--c-brand), #b07ce0); box-shadow: 0 6px 14px rgba(122, 76, 192, .25); }
.mu-route-chip.grp-in_province { background: linear-gradient(135deg, #c02c7d, #e86aae); box-shadow: 0 6px 14px rgba(214, 56, 143, .25); }
.mu-route-chip.grp-municipal { background: linear-gradient(135deg, #5b6560, #8b948f); box-shadow: 0 6px 14px rgba(107, 114, 104, .25); }
.mu-toolbar {
display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
background: #fff; border: 1px solid #e7e2f6; border-radius: 14px;
background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px;
padding: 12px; margin-bottom: 22px;
box-shadow: 0 8px 20px rgba(63, 43, 94, .06);
}
.mu-toolbar select {
flex: 1; min-width: 180px; min-height: 46px;
border: 1px solid #dfe6f1; background: linear-gradient(180deg, #fff, #f8fbff);
border-radius: 10px; padding: 0 12px; font-family: inherit; font-size: .95rem; color: #1f2a44;
border: 1px solid #dfe6f1; background: linear-gradient(180deg, var(--c-surface), var(--c-tint-purple));
border-radius: 10px; padding: 0 12px; font-family: inherit; font-size: .95rem; color: var(--c-ink);
}
/* --- รถประจำสาย + ติดต่อ (การ์ดเดียว ขึ้นก่อน) --- */
.mu-vehicle-card {
background: #fff;
border: 1px solid #e7e2f6;
background: var(--c-surface);
border: 1px solid var(--c-border);
border-radius: 18px;
overflow: hidden;
box-shadow: 0 4px 14px rgba(20, 40, 90, .06);
@@ -61,11 +61,11 @@
display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.mu-vehicle-card .meta .label {
margin: 0; font-size: .78rem; font-weight: 700; color: #7a4cc0;
margin: 0; font-size: .78rem; font-weight: 700; color: var(--c-brand-ink);
text-transform: uppercase; letter-spacing: .05em;
}
.mu-vehicle-card .meta h2 { margin: 0; font-size: 1.25rem; color: #1f2a44; }
.mu-vehicle-card .meta p { margin: 0; color: #6f7b95; font-size: .95rem; line-height: 1.6; }
.mu-vehicle-card .meta h2 { margin: 0; font-size: 1.25rem; color: var(--c-ink); }
.mu-vehicle-card .meta p { margin: 0; color: var(--c-ink-2); font-size: .95rem; line-height: 1.6; }
/* ติดต่อผู้ประกอบการ — อยู่ใน footer ของการ์ด */
.mu-vehicle-contact {
@@ -73,14 +73,14 @@
display: flex; flex-wrap: wrap; gap: 10px;
padding: 14px 18px;
border-top: 1px solid #f0ecf8;
background: #faf9ff;
background: var(--c-tint-purple);
}
.mu-contact-item {
flex: 1; min-width: 220px;
display: flex; align-items: center; gap: 12px;
padding: 12px 14px;
border-radius: 12px;
background: #fff; border: 1px solid #eee;
background: var(--c-surface); border: 1px solid #eee;
text-decoration: none; color: inherit;
transition: transform .15s ease, box-shadow .15s ease;
}
@@ -89,26 +89,26 @@
width: 42px; height: 42px; flex: none;
display: flex; align-items: center; justify-content: center;
border-radius: 12px;
background: linear-gradient(135deg, #7a4cc0, #b07ce0); color: #fff;
background: linear-gradient(135deg, var(--c-brand), #b07ce0); color: #fff;
}
.mu-contact-item .ic-wrap.tone-green { background: linear-gradient(135deg, #1f8765, #51c39c); }
.mu-contact-item .ic-wrap.tone-sky { background: linear-gradient(135deg, #1877f2, #4a9bf8); }
.mu-contact-item .ic-wrap.tone-purple { background: linear-gradient(135deg, #7a4cc0, #a583e0); }
.mu-contact-item .mu-link-go { flex: 0 0 auto; display: flex; align-items: center; color: #7a4cc0; opacity: .8; }
.mu-contact-item .ic-wrap.tone-purple { background: linear-gradient(135deg, var(--c-brand), #a583e0); }
.mu-contact-item .mu-link-go { flex: 0 0 auto; display: flex; align-items: center; color: var(--c-brand-ink); opacity: .8; }
.mu-contact-item:hover .mu-link-go { opacity: 1; transform: translateX(2px); }
.mu-contact-item .ic-wrap svg { width: 22px; height: 22px; }
.mu-contact-item .txt { flex: 1; min-width: 0; }
.mu-contact-item .txt strong { display: block; color: #1f2a44; font-size: .98rem; margin-bottom: 2px; }
.mu-contact-item .txt span { display: block; color: #6f7b95; font-size: .86rem; }
.mu-contact-item .txt strong { display: block; color: var(--c-ink); font-size: .98rem; margin-bottom: 2px; }
.mu-contact-item .txt span { display: block; color: var(--c-ink-2); font-size: .86rem; }
.mu-qr-img {
width: 72px; height: 72px; flex: none; display: block;
object-fit: contain; background: #fff;
object-fit: contain; background: var(--c-surface);
border-radius: 10px; padding: 4px; border: 1px solid #eee;
}
/* ปุ่มครอบ QR — กดเพื่อขยาย (ไม่ให้หน้าตาเปลี่ยน) */
.mu-qr-btn { flex: none; padding: 0; border: 0; background: none; cursor: zoom-in;
border-radius: 10px; line-height: 0; }
.mu-qr-btn:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 2px; }
.mu-qr-btn:focus-visible { outline: 2px solid var(--c-brand-ink); outline-offset: 2px; }
.mu-qr-btn:hover .mu-qr-img { border-color: #c9b6ec; }
/* --- ขยาย QR ลอยกลางจอ --- */
@@ -116,30 +116,30 @@
.mu-qr-modal::backdrop { background: rgba(20, 28, 48, .55); }
.mu-qr-modal-card {
position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
padding: 22px 22px 18px; border-radius: 14px; background: #fff; border: 1px solid #e7e2f6;
padding: 22px 22px 18px; border-radius: 14px; background: var(--c-surface); border: 1px solid var(--c-border);
max-width: min(92vw, 360px);
}
.mu-qr-modal-card strong { color: #1f2a44; font-size: 1.02rem; text-align: center; }
.mu-qr-big { width: min(72vw, 260px); height: auto; border-radius: 10px; background: #fff; }
.mu-qr-modal-card strong { color: var(--c-ink); font-size: 1.02rem; text-align: center; }
.mu-qr-big { width: min(72vw, 260px); height: auto; border-radius: 10px; background: var(--c-surface); }
.mu-qr-close {
position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; padding: 0;
display: flex; align-items: center; justify-content: center;
border: 0; border-radius: 10px; background: #f4f1fb; color: #5b4a80; cursor: pointer;
border: 0; border-radius: 10px; background: var(--c-tint-purple); color: var(--c-brand-ink); cursor: pointer;
}
.mu-qr-close:hover { background: #e9e2f8; }
.mu-qr-close:hover { background: var(--c-tint-purple); }
.mu-qr-close svg { width: 18px; height: 18px; }
.mu-qr-modal-card .mu-btn { display: inline-flex; align-items: center; gap: 6px; }
.mu-qr-modal-card .mu-btn .ic { width: 16px; height: 16px; }
/* กดรูป QR = เปิดลิงก์ (ทั้งใบ กดได้) */
.mu-qr-link { display: block; line-height: 0; border-radius: 10px; }
.mu-qr-link:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 3px; }
.mu-qr-link:focus-visible { outline: 2px solid var(--c-brand-ink); outline-offset: 3px; }
.mu-qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mu-copy-link.is-done { border-color: #1f8765; color: #1f8765; }
.mu-copy-link.is-done { border-color: #1f8765; color: var(--c-ok); }
/* --- แผนที่ --- */
.mu-map-card {
background: #fff;
border: 1px solid #e7e2f6;
background: var(--c-surface);
border: 1px solid var(--c-border);
border-radius: 16px;
padding: 16px;
box-shadow: 0 4px 14px rgba(20, 40, 90, .06);
+46 -46
View File
@@ -1,25 +1,25 @@
/* Ported from stopDetail.html <style> block */
.mu-other-stops { margin: 16px 0 6px; }
.mu-other-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mu-other-item { display: block; padding: 10px 12px; background: #fff;
.mu-other-item { display: block; padding: 10px 12px; background: var(--c-surface);
border: 1px solid #eef0f6; border-radius: 12px; min-width: 0; }
.mu-other-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mu-other-item .mu-time-grid { margin-top: 8px; }
.mu-other-item .mu-est-note { margin-top: 4px; }
.mu-other-idx { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: #f1e9ff;
color: #7a4cc0; font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mu-other-idx { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--c-tint-purple);
color: var(--c-brand-ink); font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mu-other-txt { flex: 1; min-width: 0; }
.mu-other-txt strong { display: block; color: #1f2a44; font-size: .94rem; }
.mu-other-txt span { display: block; color: #6f7b95; font-size: .8rem; }
.mu-other-txt strong { display: block; color: var(--c-ink); font-size: .94rem; }
.mu-other-txt span { display: block; color: var(--c-ink-2); font-size: .8rem; }
.mu-other-item .mu-chip { flex: 0 0 auto; font-family: ui-monospace, Consolas, monospace; font-size: .72rem; }
.mu-other-item .mu-chip.warn { background: #fff5e6; color: #9a6b00; border-color: #f2d9a8; }
.mu-other-item .mu-chip.warn { background: var(--c-tint-amber); color: var(--c-warn); border-color: #f2d9a8; }
:root {
--mu-accent: #7a4cc0;
--mu-accent-soft: #f3eafe;
--mu-ink: #1f2a44;
--mu-muted: #6f7b95;
--mu-ink: var(--c-ink);
--mu-muted: var(--c-ink-2);
--mu-border: #ecd7e6;
--mu-surface: #ffffff;
--mu-surface: var(--c-surface);
--mu-rose: #ec4899;
--mu-sky: #3071b8;
--mu-mint: #1f8765;
@@ -28,14 +28,14 @@
background:
radial-gradient(circle at 8% 10%, rgba(122, 76, 192, 0.09), transparent 30%),
radial-gradient(circle at 100% 0%, rgba(48, 113, 184, 0.10), transparent 28%),
linear-gradient(180deg, #fcfbff 0%, #f8f9ff 100%);
linear-gradient(180deg, var(--c-surface-2) 0%, var(--c-tint-purple) 100%);
}
.mu-stop-hero {
position: relative;
overflow: hidden;
border: 1px solid rgba(231, 224, 246, 0.95);
border-radius: 22px;
background: linear-gradient(135deg, #f8f4ff 0%, #f2f6ff 45%, #eefaf5 100%);
background: linear-gradient(135deg, var(--c-tint-purple) 0%, var(--c-tint-purple) 45%, var(--c-tint-green) 100%);
box-shadow: 0 16px 34px rgba(122, 76, 192, 0.12);
padding: 18px;
margin-bottom: 14px;
@@ -84,12 +84,12 @@
font-size: .9rem;
}
.mu-meta-row { display:flex; flex-wrap:wrap; gap:8px; margin: 12px 0 0; }
.mu-meta-pill { max-width: 100%; overflow-wrap: anywhere; background:linear-gradient(135deg, #ffffff, #f7f9ff); border:1px solid rgba(231, 224, 246, 0.9); color:#5b3b71; padding:6px 14px; border-radius:999px; font-size:.85rem; font-weight:600; box-shadow: 0 4px 10px rgba(122, 76, 192, 0.08); }
.mu-meta-pill.purple { background:linear-gradient(135deg, #f5eeff, #fce7f3); color:#7a4cc0; border-color:#e8d9f0; }
.mu-meta-pill.sky { background:linear-gradient(135deg, #ebf5ff, #eff6ff); color:#3071b8; border-color:#d7e7fb; }
.mu-meta-pill.mint { background:linear-gradient(135deg, #eafaf4, #ecfeff); color:#1f8765; border-color:#d1efdf; }
.mu-direction-tag { background:#7a4cc0; color:#fff; border-radius:999px; padding:2px 10px; font-size:.78rem; margin-left:8px; }
.mu-schedule-note { color:#9a3b6e; font-size:.8rem; margin-top:8px; padding:8px 12px; background:#fff5f9; border-left:3px solid #bb3a78; border-radius:4px; }
.mu-meta-pill { max-width: 100%; overflow-wrap: anywhere; background:linear-gradient(135deg, var(--c-surface), var(--c-tint-purple)); border:1px solid rgba(231, 224, 246, 0.9); color:var(--c-brand-ink); padding:6px 14px; border-radius:999px; font-size:.85rem; font-weight:600; box-shadow: 0 4px 10px rgba(122, 76, 192, 0.08); }
.mu-meta-pill.purple { background:linear-gradient(135deg, var(--c-tint-purple), var(--c-tint-purple)); color:var(--c-brand-ink); border-color:#e8d9f0; }
.mu-meta-pill.sky { background:linear-gradient(135deg, var(--c-tint-cyan), var(--c-tint-cyan)); color:var(--c-info); border-color:#d7e7fb; }
.mu-meta-pill.mint { background:linear-gradient(135deg, var(--c-tint-green), var(--c-tint-cyan)); color:var(--c-ok); border-color:#d1efdf; }
.mu-direction-tag { background:var(--c-brand); color:#fff; border-radius:999px; padding:2px 10px; font-size:.78rem; margin-left:8px; }
.mu-schedule-note { color:var(--c-danger); font-size:.8rem; margin-top:8px; padding:8px 12px; background:var(--c-tint-pink); border-left:3px solid #bb3a78; border-radius:4px; }
.mu-hero-metric-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -100,15 +100,15 @@
border: 1px solid rgba(231, 224, 246, 0.9);
border-radius: 12px;
padding: 10px;
background: #fff;
background: var(--c-surface);
box-shadow: 0 6px 14px rgba(122, 76, 192, 0.08);
min-width: 0;
overflow-wrap: anywhere;
}
.mu-hero-metric:nth-child(1) { background: linear-gradient(135deg, #f5efff, #fdf2f8); }
.mu-hero-metric:nth-child(2) { background: linear-gradient(135deg, #ecfeff, #eef6ff); }
.mu-hero-metric:nth-child(3) { background: linear-gradient(135deg, #fff1f2, #fff7ed); }
.mu-hero-metric:nth-child(4) { background: linear-gradient(135deg, #ecfdf5, #f0fdfa); }
.mu-hero-metric:nth-child(1) { background: linear-gradient(135deg, var(--c-tint-purple), var(--c-tint-pink)); }
.mu-hero-metric:nth-child(2) { background: linear-gradient(135deg, var(--c-tint-cyan), var(--c-tint-cyan)); }
.mu-hero-metric:nth-child(3) { background: linear-gradient(135deg, var(--c-tint-pink), var(--c-tint-amber)); }
.mu-hero-metric:nth-child(4) { background: linear-gradient(135deg, var(--c-tint-green), var(--c-tint-green)); }
.mu-hero-metric-label {
margin: 0;
color: var(--mu-muted);
@@ -126,11 +126,11 @@
}
.mu-stop-summary-main { order: 2; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mu-stop-summary-main strong { font-size: .95rem; line-height: 1.3; }
.mu-stop-summary-main .mu-stop-summary-meta { color: #6f7b95; font-size: .78rem; }
.mu-route-type-badge { display: inline-flex; align-items: center; gap: 5px; order: 3; flex: none; background: linear-gradient(135deg, #f5eeff, #fce7f3); color: #7a4cc0; padding: 4px 8px; border-radius: 8px; font-size: .8rem; font-weight: 700; border: 1px solid #e8d9f0; white-space: nowrap; }
.mu-stop-summary-main .mu-stop-summary-meta { color: var(--c-ink-2); font-size: .78rem; }
.mu-route-type-badge { display: inline-flex; align-items: center; gap: 5px; order: 3; flex: none; background: linear-gradient(135deg, var(--c-tint-purple), var(--c-tint-purple)); color: var(--c-brand-ink); padding: 4px 8px; border-radius: 8px; font-size: .8rem; font-weight: 700; border: 1px solid #e8d9f0; white-space: nowrap; }
.mu-stop-summary-rail { order: 4; flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.mu-route-chip { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 38px; padding: 5px 9px; border-radius: 8px; background: linear-gradient(135deg, #7a4cc0, #b07ce0); color: #fff; font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mu-stop-chevron { display: inline-block; color: #7a4cc0; font-size: .9rem; line-height: 1; transition: transform .2s ease; }
.mu-route-chip { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 38px; padding: 5px 9px; border-radius: 8px; background: linear-gradient(135deg, var(--c-brand), #b07ce0); color: #fff; font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mu-stop-chevron { display: inline-block; color: var(--c-brand-ink); font-size: .9rem; line-height: 1; transition: transform .2s ease; }
.mu-stop-expander[open] .mu-stop-chevron { transform: rotate(180deg); }
.mu-live-clock-card {
display: flex;
@@ -141,12 +141,12 @@
padding: 12px 14px;
border: 1px solid rgba(240, 191, 224, 0.9);
border-radius: 14px;
background: linear-gradient(135deg, #ffe8f4 0%, #f5f0ff 50%, #e8f7ff 100%);
background: linear-gradient(135deg, var(--c-tint-purple) 0%, var(--c-tint-purple) 50%, var(--c-tint-cyan) 100%);
box-shadow: 0 8px 20px rgba(122, 76, 192, 0.10);
}
.mu-live-clock-title {
margin: 0;
color: #6f7b95;
color: var(--c-ink-2);
font-size: .78rem;
font-weight: 700;
letter-spacing: .04em;
@@ -156,7 +156,7 @@
margin: 2px 0 0;
font-size: 1.65rem;
line-height: 1;
color: #1f2a44;
color: var(--c-ink);
font-weight: 800;
font-family: "K2D", "Prompt", "Noto Sans Thai", sans-serif;
}
@@ -164,9 +164,9 @@
margin: 0;
padding: 6px 10px;
border-radius: 999px;
background: linear-gradient(135deg, #ffffff, #fff7fb);
background: linear-gradient(135deg, var(--c-surface), var(--c-tint-pink));
border: 1px solid #eec7df;
color: #9333ea;
color: var(--c-brand-ink);
font-size: .78rem;
font-weight: 600;
white-space: nowrap;
@@ -185,9 +185,9 @@
display: inline-flex;
align-items: center;
gap: 6px;
background: #fff;
background: var(--c-surface);
border: 1px solid #f0d6e6;
color: #9a3b6e;
color: var(--c-danger);
border-radius: 999px;
padding: 3px 10px;
font-size: .76rem;
@@ -209,7 +209,7 @@
.mu-panel {
border: 1px solid rgba(231, 224, 246, 0.95);
border-radius: 18px;
background: linear-gradient(180deg, #ffffff, #fffbfe);
background: linear-gradient(180deg, var(--c-surface), var(--c-tint-purple));
box-shadow: 0 10px 24px rgba(122, 76, 192, 0.09);
}
@@ -225,8 +225,8 @@
border: 1px solid #e9e2fb;
box-shadow: 0 8px 24px rgba(67, 56, 202, 0.08);
}
.mu-info-card .label { font-size: .78rem; color:#66728f; margin:0; font-weight:700; }
.mu-info-card .value { margin:4px 0 0; font-size:1rem; font-weight:700; color:#2b2f42; }
.mu-info-card .label { font-size: .78rem; color:var(--c-ink-2); margin:0; font-weight:700; }
.mu-info-card .value { margin:4px 0 0; font-size:1rem; font-weight:700; color:var(--c-ink); }
.mu-layout-grid {
display: grid;
@@ -236,8 +236,8 @@
}
.mu-card-panel {
background: #fff;
border: 1px solid #ebe8f4;
background: var(--c-surface);
border: 1px solid var(--c-border-2);
border-radius: 16px;
padding: 18px;
box-shadow: 0 8px 24px rgba(67, 56, 202, 0.08);
@@ -289,7 +289,7 @@
padding: 10px 12px;
font-size: .9rem;
color: var(--mu-ink);
background: linear-gradient(180deg, #ffffff, #f8fbff);
background: linear-gradient(180deg, var(--c-surface), var(--c-tint-purple));
outline: none;
box-shadow: 0 2px 4px rgba(0,0,0,.02);
}
@@ -299,8 +299,8 @@
}
.mu-route-count {
border: 1px solid rgba(233, 200, 251, 0.9);
background: linear-gradient(135deg, #faf5ff, #fdf2f8);
color: #6b21a8;
background: linear-gradient(135deg, var(--c-tint-purple), var(--c-tint-pink));
color: var(--c-brand-ink);
border-radius: 999px;
padding: 8px 12px;
font-size: .8rem;
@@ -311,14 +311,14 @@
border-radius: 14px;
margin-bottom: 8px;
overflow: hidden;
background: linear-gradient(180deg, #fff, #fffafe);
background: linear-gradient(180deg, var(--c-surface), var(--c-tint-purple));
}
.mu-stop-expander[open] {
border-color: rgba(226, 201, 245, 0.95);
box-shadow: 0 8px 18px rgba(122, 76, 192, 0.10);
}
.mu-stop-expander > summary {
background: linear-gradient(180deg, #fff, #fff6fb);
background: linear-gradient(180deg, var(--c-surface), var(--c-tint-purple));
padding: 14px;
/* flex + wrap: จอกว้างเรียงบรรทัดเดียว / จอแคบพับลงมา ไม่ทับกัน */
display: flex;
@@ -334,7 +334,7 @@
.mu-stop-list > li:nth-child(4n + 3) .mu-stop-expander > summary { border-left: 4px solid #f472b6; }
.mu-stop-list > li:nth-child(4n + 4) .mu-stop-expander > summary { border-left: 4px solid #34d399; }
.mu-stop-expander-body {
background: linear-gradient(180deg, #fffcff, #fffcfd);
background: linear-gradient(180deg, var(--c-tint-purple), var(--c-tint-pink));
padding-left: 58px;
border-top: 1px solid #f6eaf2;
}
@@ -395,10 +395,10 @@
/* รูปสำรอง (สถานียังไม่มีรูป) — เป็นไอคอนโปร่งใส จึงใช้ contain + พื้นอ่อน ไม่ให้ยืด/ตัด */
.mu-stop-hero-photo.is-fallback {
object-fit: contain; padding: 22px; box-sizing: border-box;
background: #f7f4fd; box-shadow: none; border: 1px solid #e8e4f2;
background: var(--c-surface-2); box-shadow: none; border: 1px solid #e8e4f2;
}
.mu-nearby {
background: #fff; border: 1px solid var(--mu-border); border-radius: 20px;
background: var(--c-surface); border: 1px solid var(--mu-border); border-radius: 20px;
padding: 18px; margin: 14px 0; box-shadow: 0 10px 24px rgba(63,43,94,.06);
}
.mu-nearby h2 { margin: 0 0 4px; font-size: 1.15rem; color: var(--mu-ink); }
+59 -59
View File
@@ -1,12 +1,12 @@
/* Ported from busStop.html <style> block */
.mu-page {
background:
linear-gradient(180deg, #ffffff 0%, #faf7ff 55%, #f4f0fd 100%);
linear-gradient(180deg, var(--c-surface) 0%, var(--c-surface-2) 55%, var(--c-tint-purple) 100%);
}
.mu-hero-panel {
background: linear-gradient(135deg, #ffffff 0%, #f7f2ff 60%, #efe6ff 100%);
border: 1px solid #e7e0f6;
background: linear-gradient(135deg, var(--c-surface) 0%, var(--c-tint-purple) 60%, var(--c-tint-purple) 100%);
border: 1px solid var(--c-border);
border-radius: 8px;
padding: 18px;
margin-bottom: 16px;
@@ -15,19 +15,19 @@
gap: 16px;
align-items: stretch;
}
.mu-hero-title { margin: 0; font-size: 1.6rem; line-height: 1.2; color: #1f2a44; }
.mu-hero-subtitle { margin: 8px 0 0; color: #66728f; font-size: .95rem; max-width: 48rem; }
.mu-hero-title { margin: 0; font-size: 1.6rem; line-height: 1.2; color: var(--c-ink); }
.mu-hero-subtitle { margin: 8px 0 0; color: var(--c-ink-2); font-size: .95rem; max-width: 48rem; }
.mu-kpi-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.mu-kpi {
border: 1px solid #d9c9f2;
border-radius: 8px;
padding: 12px;
background: linear-gradient(135deg, #f0e7fc, #e6d8f8);
background: linear-gradient(135deg, var(--c-tint-purple), var(--c-tint-purple));
}
.mu-kpi .label { margin: 0; color:#6b5b8a; font-size:.76rem; font-weight:700; letter-spacing:.03em; text-transform: uppercase; }
.mu-kpi .value { margin:4px 0 0; color:#2b1f4d; font-size:1.03rem; font-weight:800; font-variant-numeric: tabular-nums; }
.mu-kpi .label { margin: 0; color:var(--c-ink-2); font-size:.76rem; font-weight:700; letter-spacing:.03em; text-transform: uppercase; }
.mu-kpi .value { margin:4px 0 0; color:var(--c-brand-ink); font-size:1.03rem; font-weight:800; font-variant-numeric: tabular-nums; }
.mu-hero-map {
border: 1px solid #e7e0f6;
border: 1px solid var(--c-border);
border-radius: 8px;
padding: 14px;
display:flex;
@@ -35,17 +35,17 @@
gap: 10px;
justify-content:space-between;
}
.mu-hero-map-title { margin:0; font-size:1rem; font-weight:800; color:#2c3e50; }
.mu-hero-map-title { margin:0; font-size:1rem; font-weight:800; color:var(--c-info); }
.mu-hero-map-box {
flex:1;
min-height: 160px;
border-radius: 8px;
background: linear-gradient(135deg, #faf7ff, #f2ecfd);
background: linear-gradient(135deg, var(--c-surface-2), var(--c-tint-purple));
border: 1px dashed #d9cdf2;
display:flex;
align-items:center;
justify-content:center;
color:#66728f;
color:var(--c-ink-2);
font-weight:700;
text-align:center;
padding: 18px;
@@ -53,7 +53,7 @@
/* ===== Search toolbar: 2 โหมด ===== */
.mu-toolbar {
background: linear-gradient(135deg, #f0e7fc, #e6d8f8);
background: linear-gradient(135deg, var(--c-tint-purple), var(--c-tint-purple));
border: 1px solid #d9c9f2;
border-radius: 8px;
padding: 14px;
@@ -76,8 +76,8 @@
padding: 10px 18px;
border: none;
border-right: 1px solid #d5c3f0;
background: #fff;
color: #5b3b71;
background: var(--c-surface);
color: var(--c-brand-ink);
cursor: pointer;
display: inline-flex;
align-items: center;
@@ -85,8 +85,8 @@
transition: background .15s ease, color .15s ease;
}
.mu-search-tab:last-child { border-right: none; }
.mu-search-tab:hover { background: #f3ecff; }
.mu-search-tab.active { background: linear-gradient(135deg, #7a4cc0, #b07ce0); color: #fff; }
.mu-search-tab:hover { background: var(--c-tint-purple); }
.mu-search-tab.active { background: linear-gradient(135deg, var(--c-brand), #b07ce0); color: #fff; }
.mu-search-tab .ic { width: 16px; height: 16px; }
.mu-search-mode { display: block; }
@@ -99,13 +99,13 @@
gap: 10px;
border: 1px solid #d5c3f0;
border-radius: 8px;
background: #fff;
background: var(--c-surface);
padding: 0 12px;
min-height: 48px;
transition: border-color .15s ease;
}
.mu-search-field:focus-within { border-color: #a855f7; }
.mu-search-field .ic { position: static; width: 18px; height: 18px; color: #8b5cf6; flex: none; }
.mu-search-field .ic { position: static; width: 18px; height: 18px; color: var(--c-brand-ink); flex: none; }
.mu-search-field input {
flex: 1;
min-width: 0;
@@ -115,10 +115,10 @@
font-family: inherit;
font-size: 1rem;
font-weight: 600;
color: #1f2a44;
color: var(--c-ink);
padding: 12px 0;
}
.mu-search-field input::placeholder { color: #6f7b95; font-weight: 500; opacity: .8; }
.mu-search-field input::placeholder { color: var(--c-ink-2); font-weight: 500; opacity: .8; }
/* ===== ช่องรหัสป้าย 6 ช่อง: [x] + [x][x][x][x] ===== */
.mu-code-boxes {
@@ -134,9 +134,9 @@
font-size: 1.35rem;
font-weight: 700;
font-variant-numeric: tabular-nums;
color: #1f2a44;
background: #fff;
border: 2px solid #e0d6f5;
color: var(--c-ink);
background: var(--c-surface);
border: 2px solid var(--c-border);
border-radius: 8px;
outline: none;
padding: 0;
@@ -145,17 +145,17 @@
}
.mu-code-cell::-webkit-outer-spin-button,
.mu-code-cell::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mu-code-cell::placeholder { color: #7a6a9e; font-weight: 600; opacity: 1; }
.mu-code-cell::placeholder { color: var(--c-ink-2); font-weight: 600; opacity: 1; }
.mu-code-cell:focus {
border-color: #a855f7;
background: #faf7ff;
background: var(--c-surface-2);
}
.mu-code-cell:disabled { opacity: .45; }
/* 2 หลักหน้า (ก่อน +) — เน้นให้เห็นว่าเป็นหัวของรหัส */
.mu-code-cell:nth-of-type(1),
.mu-code-cell:nth-of-type(2) {
border-color: #b07ce0;
background: linear-gradient(135deg, #7a4cc0, #b07ce0);
background: linear-gradient(135deg, var(--c-brand), #b07ce0);
color: #fff;
}
.mu-code-cell:nth-of-type(1)::placeholder,
@@ -166,7 +166,7 @@
font-family: "IBM Plex Mono", ui-monospace, monospace;
font-size: 1.5rem;
font-weight: 700;
color: #7a4cc0;
color: var(--c-brand-ink);
line-height: 1;
padding: 0 2px;
}
@@ -175,18 +175,18 @@
font-family: "IBM Plex Mono", ui-monospace, monospace;
font-size: .9rem;
font-weight: 700;
color: #6d28d9;
color: var(--c-brand-ink);
font-variant-numeric: tabular-nums;
}
.mu-search-hint { margin: 8px 0 0; font-size: .82rem; color: #6f7b95; }
.mu-search-hint { margin: 8px 0 0; font-size: .82rem; color: var(--c-ink-2); }
/* suggest */
.mu-suggest {
border: 1px solid #e0d6f5;
border: 1px solid var(--c-border);
border-radius: 8px;
margin-top: 8px;
overflow: hidden;
background: #fff;
background: var(--c-surface);
max-height: 260px;
overflow-y: auto;
}
@@ -199,21 +199,21 @@
padding: 11px 14px;
border: none;
border-bottom: 1px solid #f1edfa;
background: #fff;
background: var(--c-surface);
font-family: inherit;
font-size: .9rem;
text-align: left;
cursor: pointer;
color: #1f2a44;
color: var(--c-ink);
}
.mu-suggest-item:last-child { border-bottom: none; }
.mu-suggest-item:hover { background: #faf7ff; }
.mu-suggest-item:hover { background: var(--c-surface-2); }
.mu-suggest-code {
font-family: "IBM Plex Mono", ui-monospace, monospace;
font-size: .85rem;
font-weight: 700;
color: #fff;
background: linear-gradient(135deg, #7a4cc0, #b07ce0);
background: linear-gradient(135deg, var(--c-brand), #b07ce0);
padding: 3px 9px;
border-radius: 4px;
flex: none;
@@ -223,10 +223,10 @@
.mu-toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.mu-show-more { display: flex; justify-content: center; margin: 14px 0 4px; }
.mu-show-more .mu-btn { min-width: 220px; }
.mu-stop-card.is-stub { min-height: 120px; background: #faf8ff; border: 1px dashed #ddd2f2; box-shadow: none; }
.mu-stop-card.is-stub { min-height: 120px; background: var(--c-tint-purple); border: 1px dashed #ddd2f2; box-shadow: none; }
.mu-toolbar-count { margin: 10px 0 0; font-size: .84rem; color: #6f7b95; }
.mu-toolbar-count b { color: #7a4cc0; font-variant-numeric: tabular-nums; }
.mu-toolbar-count { margin: 10px 0 0; font-size: .84rem; color: var(--c-ink-2); }
.mu-toolbar-count b { color: var(--c-brand-ink); font-variant-numeric: tabular-nums; }
/* ===== การ์ดป้าย ===== */
.mu-stop-grid {
@@ -240,15 +240,15 @@
margin: 0;
border-radius: 8px;
overflow: hidden;
border: 1px solid #e7e0f6;
background: #fff;
border: 1px solid var(--c-border);
background: var(--c-surface);
transition: border-color .15s ease, transform .15s ease;
}
.mu-stop-grid li:hover { border-color: #a855f7; transform: translateY(-1px); }
.mu-stop-card {
height: 100%;
padding: 16px;
background: #fff;
background: var(--c-surface);
display:flex;
flex-direction:column;
gap: 12px;
@@ -263,9 +263,9 @@
font-weight:800;
letter-spacing:.01em;
}
.mu-type-pill.local { background: #f3ecff; color: #6d28d9; }
.mu-stop-title { margin:6px 0 0; font-size:1.05rem; line-height:1.3; color:#1f2a44; }
.mu-loc { color:#6f7b95; font-size:.85rem; margin-top:4px; }
.mu-type-pill.local { background: var(--c-tint-purple); color: var(--c-brand-ink); }
.mu-stop-title { margin:6px 0 0; font-size:1.05rem; line-height:1.3; color:var(--c-ink); }
.mu-loc { color:var(--c-ink-2); font-size:.85rem; margin-top:4px; }
.mu-chip-row { display:flex; flex-wrap:wrap; gap:8px; }
.mu-chip {
display:inline-flex;
@@ -273,20 +273,20 @@
gap:6px;
padding:5px 10px;
border-radius: 4px;
background: #faf7ff;
border: 1px solid #e7e0f6;
color:#5b3b71;
background: var(--c-surface-2);
border: 1px solid var(--c-border);
color:var(--c-brand-ink);
font-size:.8rem;
font-weight:700;
}
.mu-chip.route { background: #f3ecff; color:#6d28d9; border-color: #e0d6f5; }
.mu-chip.route { background: var(--c-tint-purple); color:var(--c-brand-ink); border-color: var(--c-border); }
/* ชิปสายที่เป็นลิงก์ → ไปหน้าเช็กเวลาของสายนั้น (หน้าตาเหมือนชิปเดิม + มี hover/focus) */
a.mu-chip.route { text-decoration: none; cursor: pointer; }
a.mu-chip.route:hover { background:#e9dcff; border-color:#cdb5f2; }
a.mu-chip.route:focus-visible { outline: 2px solid #7a4cc0; outline-offset: 2px; }
a.mu-chip.route:hover { background:var(--c-tint-purple); border-color:#cdb5f2; }
a.mu-chip.route:focus-visible { outline: 2px solid var(--c-brand-ink); outline-offset: 2px; }
/* รหัสป้าย = ม่วง-ขาว แบบเดียวกับป้ายสายรถ */
.mu-chip.count.stop-code {
background: linear-gradient(135deg, #7a4cc0, #b07ce0);
background: linear-gradient(135deg, var(--c-brand), #b07ce0);
color: #fff;
border-color: transparent;
font-family: "IBM Plex Mono", ui-monospace, monospace;
@@ -298,21 +298,21 @@
padding: 7px 11px;
}
.mu-stop-action { margin-top:auto; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.mu-stop-note { color:#6f7b95; font-size:.8rem; margin:0; }
.mu-stop-note { color:var(--c-ink-2); font-size:.8rem; margin:0; }
.mu-stop-thumb {
display: block;
width: 100%;
height: 180px;
object-fit: cover;
background: #f7f9fd;
border-bottom: 1px solid #e7e0f6;
background: var(--c-tint-purple);
border-bottom: 1px solid var(--c-border);
}
/* รูป placeholder — ย่อและจัดกลาง ไม่ให้ครอปโลโก้ */
.mu-stop-thumb.is-placeholder {
object-fit: contain;
padding: 34px;
background: linear-gradient(135deg, #faf7ff, #f2ecfd);
background: linear-gradient(135deg, var(--c-surface-2), var(--c-tint-purple));
}
.mu-stop-empty {
@@ -320,10 +320,10 @@
list-style: none;
padding: 40px 16px;
text-align: center;
color: #6f7b95;
border: 1px dashed #e0d6f5;
color: var(--c-ink-2);
border: 1px dashed var(--c-border);
border-radius: 8px;
background: #fff;
background: var(--c-surface);
}
@media (max-width: 980px) {
+10 -10
View File
@@ -70,7 +70,7 @@ main.mu-container { padding-top: 24px; padding-bottom: 24px; }
display: flex; align-items: center; justify-content: center;
width: 44px; height: 44px;
border: none; background: transparent; cursor: pointer;
color: #1f2a44; list-style: none;
color: var(--c-ink); list-style: none;
border-radius: 10px;
}
.mu-menu-btn::-webkit-details-marker { display: none; }
@@ -78,7 +78,7 @@ main.mu-container { padding-top: 24px; padding-bottom: 24px; }
.mu-menu-panel {
position: absolute; top: calc(100% + 8px); right: 0;
min-width: 220px;
background: #fff; border: 1px solid #e7e2f6; border-radius: 14px;
background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px;
box-shadow: 0 12px 28px rgba(20, 40, 90, .16);
padding: 8px;
z-index: 60;
@@ -88,10 +88,10 @@ main.mu-container { padding-top: 24px; padding-bottom: 24px; }
display: flex; align-items: center;
min-height: 48px; padding: 10px 14px;
border-radius: 10px;
color: #1f2a44; text-decoration: none;
color: var(--c-ink); text-decoration: none;
font-size: 1.05rem; font-weight: 600;
}
.mu-menu-panel a:hover, .mu-menu-panel a:active { background: #f5efff; }
.mu-menu-panel a:hover, .mu-menu-panel a:active { background: var(--c-tint-purple); }
/* --- hero (หน้าแรก) — ช่องว่าง + ตัวหนังสือใหญ่ขึ้น --- */
.mu-hero { padding: 30px 0 34px; }
@@ -125,9 +125,9 @@ main.mu-container { padding-top: 14px; padding-bottom: 14px; }
#view .mu-zone-seg { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; }
#view .mu-zone-seg:not(:last-child)::after { content: "\00b7"; color: #c4bcd8; margin-left: 8px; } /* คั่นท้ายชิ้น → ตัดบรรทัดแล้วจุดไม่ไปอยู่ต้นบรรทัด */
#view .mu-zone-seg .ic { align-self: center; flex: none; }
#view .mu-zone-now b { color: #1f2a44; font-variant-numeric: tabular-nums; }
#view .mu-zone-at { color: #8a93a8; } /* ชื่อสถานีในวงเล็บ — จางกว่ารอบรถ */
#view .mu-zone-updated { color: #8a7aa8; font-size: .95rem; }
#view .mu-zone-now b { color: var(--c-ink); font-variant-numeric: tabular-nums; }
#view .mu-zone-at { color: var(--c-ink-2); } /* ชื่อสถานีในวงเล็บ — จางกว่ารอบรถ */
#view .mu-zone-updated { color: var(--c-ink-2); font-size: .95rem; }
.mu-grid { gap: 12px; }
.mu-route-info { padding: 16px 16px 18px; }
.mu-route-name { margin-bottom: 6px; }
@@ -275,12 +275,12 @@ main.mu-container { padding-top: 14px; padding-bottom: 14px; }
/* เวลาที่ "คำนวณจากต้นทาง" (ไม่ใช่ตารางจริงของผู้ประกอบการ) — ทำเครื่องหมายให้ผู้ใช้รู้ ไม่ให้เข้าใจผิด */
.mu-time-grid.is-est .mu-time-chip {
border: 1px dashed #a892d4;
background: #faf7ff;
color: #6b5a8e;
background: var(--c-surface-2);
color: var(--c-brand-ink);
font-style: italic;
}
.mu-est-note {
margin: 6px 0 0;
font-size: .78rem;
color: #6b5a8e;
color: var(--c-brand-ink);
}
+76 -76
View File
@@ -1,5 +1,5 @@
/* Ported from web-at-transit-mock/ui/index.html <style> */
.mu-card.empty { width: 100%; padding: 16px; text-align: center; color: #6f7b95; background: #fff7fb; border: 1px dashed #f4c7df; }
.mu-card.empty { width: 100%; padding: 16px; text-align: center; color: var(--c-ink-2); background: var(--c-tint-pink); border: 1px dashed #f4c7df; }
a.mu-card { text-decoration: none; color: inherit; display: block; }
/* Page-specific: hero */
@@ -27,12 +27,12 @@
letter-spacing: .02em;
}
/* zone tint — พื้นหลังการ์ดตามหมวดเส้นทาง (ตัวการ์ด = เฉดอ่อน / หัวการ์ด = เฉดสด) */
.mu-zone:has(.tag-sky) { --zone-tint: #eff6ff; }
.mu-zone:has(.tag-purple) { --zone-tint: #f5f3ff; }
.mu-zone:has(.tag-pink) { --zone-tint: #fdf2f8; }
.mu-zone:has(.tag-yellow) { --zone-tint: #fffbeb; }
.mu-zone:has(.tag-sky) { --zone-tint: var(--c-tint-cyan); }
.mu-zone:has(.tag-purple) { --zone-tint: var(--c-tint-purple); }
.mu-zone:has(.tag-pink) { --zone-tint: var(--c-tint-pink); }
.mu-zone:has(.tag-yellow) { --zone-tint: var(--c-tint-amber); }
.mu-zone .mu-card,
.mu-zone .mu-route-info { background: var(--zone-tint, #fff); }
.mu-zone .mu-route-info { background: var(--zone-tint, var(--c-surface)); }
.mu-zone:has(.tag-sky) .mu-card-head { background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%); }
.mu-zone:has(.tag-purple) .mu-card-head { background: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%); }
@@ -40,46 +40,46 @@
.mu-zone:has(.tag-yellow) .mu-card-head { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
/* การ์ดที่ยังไม่มีข้อมูล (is-empty): พื้นเทา + N/A แทนเลขสาย ไม่มีเงาตัวอักษร */
.mu-card.is-empty,
.mu-card.is-empty .mu-route-info { background: #f0f2f5; }
.mu-card.is-empty .mu-card-head { background: #e4e7eb; }
.mu-card.is-empty .mu-route-number { color: #5b636e !important; text-shadow: none !important; font-size: 42px !important; }
.mu-card.is-empty .mu-route-info { background: var(--c-tint-cyan); }
.mu-card.is-empty .mu-card-head { background: var(--c-surface-3); }
.mu-card.is-empty .mu-route-number { color: var(--c-ink-2) !important; text-shadow: none !important; font-size: 42px !important; }
.mu-card.is-empty { cursor: default; }
.mu-card.is-empty:hover { transform: none; box-shadow: 0 4px 14px rgba(20,40,90,.06); }
.mu-route-info { padding: 14px 16px 16px; background: #fff; }
.mu-route-name { margin: 0 0 10px; font-size: .95rem; color: #1f2a44; font-weight: 700; }
.mu-route-info { padding: 14px 16px 16px; background: var(--c-surface); }
.mu-route-name { margin: 0 0 10px; font-size: .95rem; color: var(--c-ink); font-weight: 700; }
/* ===== maintheme.png look: topbar, hero, zones, grid, summary, footer ===== */
body.main-theme-page { margin: 0; font-family: 'K2D','Noto Sans Thai','Prompt',system-ui,sans-serif; color: #1f2a44; background: #f7f9fd; }
body.main-theme-page { margin: 0; font-family: 'K2D','Noto Sans Thai','Prompt',system-ui,sans-serif; color: var(--c-ink); background: var(--c-bg); }
.mu-container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
/* Topbar */
/* z-index 1100 — ต้องสูงกว่า Leaflet (pane 400 · control 800 · .leaflet-top 1000)
ไม่งั้นแผนที่จะบัง nav ตอนเลื่อน */
.mu-topbar { background: #ffffff; border-bottom: 1px solid #e9eef7; position: sticky; top: 0; z-index: 1100; box-shadow: 0 2px 8px rgba(20,40,90,.04); }
.mu-topbar { background: var(--c-surface); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 1100; box-shadow: 0 2px 8px rgba(20,40,90,.04); }
.mu-topbar-inner { display: flex; align-items: center; gap: 18px; padding: 14px 28px; }
.mu-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.mu-logo-img { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#8b5cf6,#ec4899); padding: 4px; transition: transform .15s ease; }
.mu-brand:hover .mu-logo-img { transform: scale(1.06); }
.mu-brand-title { display: block; margin: 0; font-weight: 800; font-size: 1.05rem; color: #1f2a44; transition: color .15s ease; }
.mu-brand:hover .mu-brand-title { color: #7a4cc0; }
.mu-brand-subtitle { display: block; margin: 0; font-size: .72rem; color: #6f7b95; }
.mu-brand-title { display: block; margin: 0; font-weight: 800; font-size: 1.05rem; color: var(--c-ink); transition: color .15s ease; }
.mu-brand:hover .mu-brand-title { color: var(--c-brand-ink); }
.mu-brand-subtitle { display: block; margin: 0; font-size: .72rem; color: var(--c-ink-2); }
.mu-nav { margin-left: auto; display: flex; gap: 28px; }
.mu-nav a { color: #4a5876; text-decoration: none; font-size: .92rem; font-weight: 600; padding: 6px 4px; border-bottom: 2px solid transparent; }
.mu-nav a.active { color: #d6336c; border-bottom-color: #ec4899; }
.mu-nav a:hover { color: #1f2a44; }
.mu-nav a { color: var(--c-info); text-decoration: none; font-size: .92rem; font-weight: 600; padding: 6px 4px; border-bottom: 2px solid transparent; }
.mu-nav a.active { color: var(--c-danger); border-bottom-color: #ec4899; }
.mu-nav a:hover { color: var(--c-ink); }
.mu-action-btn { background: linear-gradient(135deg,#a855f7,#7c3aed); color:#fff; padding: 10px 22px; border-radius: 999px; text-decoration:none; font-weight: 700; font-size:.88rem; box-shadow: 0 6px 14px rgba(124,58,237,.3); }
/* Hero */
.mu-hero { position: relative; overflow: hidden; padding: 56px 0 64px; background: linear-gradient(180deg, #f0ebff 0%, #ffe8ee 50%, #fff4d6 100%); text-align: center; }
.mu-hero { position: relative; overflow: hidden; padding: 56px 0 64px; background: linear-gradient(180deg, var(--c-tint-purple) 0%, var(--c-tint-pink) 50%, var(--c-tint-amber) 100%); text-align: center; }
.mu-hero-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; filter: saturate(1.1); z-index: 0; pointer-events: none; }
.mu-blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; z-index: 0; }
.mu-blob.one { width: 220px; height: 220px; background: #b794f4; top: -50px; left: 8%; }
.mu-blob.two { width: 260px; height: 260px; background: #f9a8d4; top: 40%; right: 8%; }
.mu-blob.three{ width: 180px; height: 180px; background: #fde68a; bottom: -40px; left: 38%; }
.mu-blob.three{ width: 180px; height: 180px; background: var(--c-tint-amber); bottom: -40px; left: 38%; }
.mu-hero-content { position: relative; z-index: 1; }
.mu-badge { display: inline-block; background: rgba(255,255,255,.7); backdrop-filter: blur(6px); color: #6d28d9; padding: 6px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700; margin-bottom: 18px; box-shadow: 0 4px 10px rgba(124,58,237,.12); }
.mu-hero h1 { margin: 0 0 26px; font-size: 2.2rem; font-weight: 800; line-height: 1.35; color: #1f2a44; }
.mu-badge { display: inline-block; background: var(--c-glass-70); backdrop-filter: blur(6px); color: var(--c-brand-ink); padding: 6px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700; margin-bottom: 18px; box-shadow: 0 4px 10px rgba(124,58,237,.12); }
.mu-hero h1 { margin: 0 0 26px; font-size: 2.2rem; font-weight: 800; line-height: 1.35; color: var(--c-ink); }
.mu-gradient-text { background: linear-gradient(120deg, #d946ef 10%, #a855f7 60%, #6366f1 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
/* ===== Route selector: จังหวัด → สถานีขนส่งผู้โดยสาร (cascade) ===== */
.mu-route-selector {
@@ -100,23 +100,23 @@
margin: 0 0 7px 8px;
font-size: .8rem;
font-weight: 700;
color: #6f7b95;
color: var(--c-ink-2);
letter-spacing: .01em;
}
.mu-select-field > label svg { width: 15px; height: 15px; color: #8b5cf6; flex: none; }
.mu-select-field > label svg { width: 15px; height: 15px; color: var(--c-brand-ink); flex: none; }
.mu-select-box {
position: relative;
display: flex;
align-items: center;
background: #fff;
border: 1px solid #e7e2f6;
background: var(--c-surface);
border: 1px solid var(--c-border);
border-radius: 14px;
box-shadow: 0 8px 20px rgba(63, 43, 94, .08);
transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.mu-select-box:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(63,43,94,.12); }
.mu-select-box:focus-within { border-color: #c8b4ec; box-shadow: 0 0 0 4px rgba(122,76,192,.14), 0 10px 24px rgba(63,43,94,.10); }
.mu-select-box .mu-select-icon { width: 20px; height: 20px; margin-left: 14px; color: #8b5cf6; flex: none; }
.mu-select-box .mu-select-icon { width: 20px; height: 20px; margin-left: 14px; color: var(--c-brand-ink); flex: none; }
.mu-select-box select {
flex: 1;
min-width: 0;
@@ -126,16 +126,16 @@
font-family: inherit;
font-size: .95rem;
font-weight: 600;
color: #1f2a44;
color: var(--c-ink);
padding: 14px 12px;
cursor: pointer;
appearance: none;
-webkit-appearance: none;
}
.mu-select-box .mu-select-chevron { width: 18px; height: 18px; margin-right: 14px; color: #8b5cf6; flex: none; pointer-events: none; }
.mu-select-box .mu-select-chevron { width: 18px; height: 18px; margin-right: 14px; color: var(--c-brand-ink); flex: none; pointer-events: none; }
.mu-select-arrow { display: none; align-self: center; color: #c4b5e6; font-weight: 700; font-size: 1.15rem; padding-bottom: 18px; }
.mu-select-hint { margin: 12px 0 0; font-size: .84rem; color: #6f7b95; min-height: 1.25em; }
.mu-select-hint b { color: #7a4cc0; font-weight: 700; }
.mu-select-hint { margin: 12px 0 0; font-size: .84rem; color: var(--c-ink-2); min-height: 1.25em; }
.mu-select-hint b { color: var(--c-brand-ink); font-weight: 700; }
/* ===== Hero actions ===== */
.mu-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
@@ -145,9 +145,9 @@
gap: 7px;
padding: 11px 20px;
border-radius: 999px;
background: #fff;
border: 1px solid #e7e2f6;
color: #5b3b71;
background: var(--c-surface);
border: 1px solid var(--c-border);
color: var(--c-brand-ink);
text-decoration: none;
font-size: .88rem;
font-weight: 700;
@@ -166,60 +166,60 @@
.mu-zone { margin-bottom: 32px; }
.mu-zone-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 14px; }
.mu-zone-tag { padding: 5px 14px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.mu-zone-tag.tag-sky { background: #dbeafe; color: #1d4ed8; }
.mu-zone-tag.tag-pink { background: #fce7f3; color: #be185d; }
.mu-zone-tag.tag-purple { background: #ede9fe; color: #6d28d9; }
.mu-zone-tag.tag-yellow { background: #fdf1d3; color: #8a6100; }
.mu-zone-tag.tag-sky { background: var(--c-tint-cyan); color: var(--c-info); }
.mu-zone-tag.tag-pink { background: var(--c-tint-purple); color: var(--c-danger); }
.mu-zone-tag.tag-purple { background: var(--c-tint-purple); color: var(--c-brand-ink); }
.mu-zone-tag.tag-yellow { background: var(--c-tint-amber); color: var(--c-warn); }
/* คำอธิบายสีการ์ดตามหมวดเส้นทาง */
.mu-legend { background: #fff; border: 1px solid #e9eef7; border-radius: 14px; padding: 16px 18px; margin-bottom: 26px; box-shadow: 0 4px 14px rgba(20,40,90,.05); }
.mu-legend-title { margin: 0 0 12px; font-size: .95rem; font-weight: 800; color: #1f2a44; }
.mu-legend { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; padding: 16px 18px; margin-bottom: 26px; box-shadow: 0 4px 14px rgba(20,40,90,.05); }
.mu-legend-title { margin: 0 0 12px; font-size: .95rem; font-weight: 800; color: var(--c-ink); }
.mu-legend-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 18px; }
.mu-legend-list li { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: #3d4a63; }
.mu-legend-list li { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: var(--c-info); }
.mu-legend-list .sw { width: 26px; height: 16px; border-radius: 4px; flex: none; border: 1px solid rgba(20,40,90,.12); }
.sw-bangkok { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.sw-interprov { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.sw-inprov { background: linear-gradient(135deg, #ec4899, #f472b6); }
.sw-municipal { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.sw-empty { background: #e4e7eb; }
.mu-legend-note { margin: 12px 0 0; color: #6f7b95; font-size: .82rem; }
.mu-zone-sub, .mu-zone-desc { color: #6f7b95; font-size: .88rem; margin: 0; }
.sw-empty { background: var(--c-surface-3); }
.mu-legend-note { margin: 12px 0 0; color: var(--c-ink-2); font-size: .82rem; }
.mu-zone-sub, .mu-zone-desc { color: var(--c-ink-2); font-size: .88rem; margin: 0; }
/* ทุกบรรทัดคำอธิบายกินเต็มความกว้างของตัวเอง — ไม่ถูกบีบไปรวมแถวเดียวกับป้ายหัวข้อ
(เดิม flex ไม่มี wrap → ทุกบรรทัดถูกย่อรวมกันหมด ข้อความไทยจึงตัดคำมั่ว) */
.mu-zone-head .mu-zone-desc { flex-basis: 100%; min-width: 0; line-height: 1.65; }
/* แถวข้อมูลแบบ "ชิ้น" (segment) — กฎจริงอยู่ใน responsive.css (#view …) เพราะต้องชนะ
<style> ของ partial ที่ถูก inject ทีหลัง · ที่นี่เก็บเฉพาะสีที่ใช้ร่วมทุกหน้า */
.mu-zone-updated { color: #8a7aa8; }
.mu-zone-updated { color: var(--c-ink-2); }
.mu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
/* Cards */
.mu-card { display: block; text-decoration: none; color: inherit; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(20,40,90,.06); transition: transform .15s, box-shadow .15s; }
.mu-card { display: block; text-decoration: none; color: inherit; background: var(--c-surface); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(20,40,90,.06); transition: transform .15s, box-shadow .15s; }
.mu-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,40,90,.1); }
.mu-card-head { aspect-ratio: auto !important; height: 130px !important; display: flex !important; align-items: center; justify-content: center; position: relative; }
.mu-card-head::after { display: none !important; }
.mu-card-head .mu-route-number { position: static !important; color: #fff !important; font-size: 52px !important; font-weight: 900; text-shadow: 0 4px 12px rgba(0,0,0,.2) !important; letter-spacing: .02em; margin: 0; }
.mu-route-info { padding: 14px 14px 14px; }
.mu-route-name { margin: 0 0 10px; font-size: .9rem; color: #1f2a44; font-weight: 700; }
.mu-card .mu-badge { background: #dcfce7; color: #15803d; padding: 4px 10px; font-size: .78rem; font-weight: 700; box-shadow: none; backdrop-filter: none; }
.mu-next-trip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #dcfce7; color: #15803d; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-sky { background: #dbeafe; color: #1d4ed8; }
.badge-pink { background: #fce7f3; color: #be185d; }
.badge-mint { background: #d1fae5; color: #047857; }
.badge-gray { background: #e8eaed; color: #5b636e; }
.mu-route-name { margin: 0 0 10px; font-size: .9rem; color: var(--c-ink); font-weight: 700; }
.mu-card .mu-badge { background: var(--c-tint-green); color: var(--c-ok); padding: 4px 10px; font-size: .78rem; font-weight: 700; box-shadow: none; backdrop-filter: none; }
.mu-next-trip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--c-tint-green); color: var(--c-ok); }
.badge-purple { background: var(--c-tint-purple); color: var(--c-brand-ink); }
.badge-sky { background: var(--c-tint-cyan); color: var(--c-info); }
.badge-pink { background: var(--c-tint-purple); color: var(--c-danger); }
.badge-mint { background: var(--c-tint-green); color: var(--c-ok); }
.badge-gray { background: var(--c-tint-cyan); color: var(--c-ink-2); }
.mu-route-chip-wrap { display:flex; gap: 8px; }
/* Summary stats */
.mu-summary { padding: 20px 0 40px; }
.mu-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mu-stat { padding: 28px 18px; text-align: center; border-radius: 18px; font-weight: 700; margin: 0; }
.mu-stat h3 { margin: 0 0 4px; font-size: 2rem; color: #1f2a44; font-weight: 800; }
.mu-stat p { margin: 0; font-size: .82rem; color: #4a5876; font-weight: 600; }
.mu-stat.tag-pink { background: #fce7f3; }
.mu-stat.tag-sky { background: #dbeafe; }
.mu-stat.tag-purple { background: #ede9fe; }
.mu-stat.tag-mint { background: #d1fae5; }
.mu-stat h3 { margin: 0 0 4px; font-size: 2rem; color: var(--c-ink); font-weight: 800; }
.mu-stat p { margin: 0; font-size: .82rem; color: var(--c-info); font-weight: 600; }
.mu-stat.tag-pink { background: var(--c-tint-purple); }
.mu-stat.tag-sky { background: var(--c-tint-cyan); }
.mu-stat.tag-purple { background: var(--c-tint-purple); }
.mu-stat.tag-mint { background: var(--c-tint-green); }
/* ===== Visitor counter (footer bottom bar) ===== */
.mu-footer-bottom { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
@@ -238,7 +238,7 @@
letter-spacing: .01em;
line-height: 1;
}
.mu-visitor svg { width: 14px; height: 14px; color: #b694f6; flex: none; }
.mu-visitor svg { width: 14px; height: 14px; color: var(--c-brand-ink); flex: none; }
.mu-visitor strong { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
/* ปุ่ม/ช่องรีเซ็ตผู้เข้าชม (ซ่อน — กดตัวเลข 5 ครั้ง) */
#visitor-count { cursor: pointer; }
@@ -247,32 +247,32 @@
padding: 20px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px);
}
.mu-vreset-card {
width: 100%; max-width: 340px; background: #fff; border-radius: 16px; padding: 20px;
width: 100%; max-width: 340px; background: var(--c-surface); border-radius: 16px; padding: 20px;
box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
}
.mu-vreset-card h4 { margin: 0 0 12px; font-size: 1rem; color: #1f2a44; }
.mu-vreset-card label { display: block; font-size: .8rem; color: #6b7a94; margin-bottom: 6px; }
.mu-vreset-card h4 { margin: 0 0 12px; font-size: 1rem; color: var(--c-ink); }
.mu-vreset-card label { display: block; font-size: .8rem; color: var(--c-ink-2); margin-bottom: 6px; }
.mu-vreset-card input {
width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: .95rem;
border: 1px solid #d9d3e8; border-radius: 10px; color: #1f2a44; background: #fbfaff;
border: 1px solid var(--c-border); border-radius: 10px; color: var(--c-ink); background: var(--c-surface-2);
}
.mu-vreset-card input:focus { outline: 2px solid #7a4cc0; outline-offset: 1px; border-color: #7a4cc0; }
.mu-vreset-msg { margin: 10px 0 0; min-height: 18px; font-size: .8rem; color: #b3261e; }
.mu-vreset-msg.is-ok { color: #1f7a3d; }
.mu-vreset-card input:focus { outline: 2px solid var(--c-brand-ink); outline-offset: 1px; border-color: #7a4cc0; }
.mu-vreset-msg { margin: 10px 0 0; min-height: 18px; font-size: .8rem; color: var(--c-danger); }
.mu-vreset-msg.is-ok { color: var(--c-ok); }
.mu-vreset-row { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }
.mu-vreset-row button {
padding: 9px 16px; font-size: .85rem; font-weight: 700; border-radius: 10px; cursor: pointer;
border: 1px solid #d9d3e8; background: #fff; color: #3d4a63;
border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-info);
}
.mu-vreset-row button:hover { background: #fbfaff; }
.mu-vreset-ok { border-color: #7a4cc0 !important; background: #7a4cc0 !important; color: #fff !important; }
.mu-vreset-row button:hover { background: var(--c-surface-2); }
.mu-vreset-ok { border-color: #7a4cc0 !important; background: var(--c-brand) !important; color: #fff !important; }
.mu-vreset-ok:hover { background: #6a3fb0 !important; }
/* ===== Sponsor marquee (between hero and main) ===== */
.mu-sponsor-marquee { padding: 26px 0 6px; background: #fff; border-bottom: 1px solid #f0f2f8; }
.mu-sponsor-marquee { padding: 26px 0 6px; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.mu-sponsor-head { text-align: center; margin-bottom: 18px; }
.mu-sponsor-head h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; color: #1f2a44; letter-spacing: .01em; }
.mu-sponsor-head .lead { margin: 0; color: #6f7b95; font-size: .84rem; }
.mu-sponsor-head h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; color: var(--c-ink); letter-spacing: .01em; }
.mu-sponsor-head .lead { margin: 0; color: var(--c-ink-2); font-size: .84rem; }
.mu-marquee {
overflow: hidden;
position: relative;
@@ -300,7 +300,7 @@
display: flex;
align-items: center;
justify-content: center;
background: #fff;
background: var(--c-surface);
border: 1px solid #eef0f6;
border-radius: 14px;
box-shadow: 0 4px 12px rgba(63, 43, 94, .05);
+140
View File
@@ -0,0 +1,140 @@
/* ============================================================
Atroute — Theme tokens (light / dark)
ทำไมมีไฟล์นี้
เดิม CSS ทุกไฟล์ใส่ hex ตรง ๆ (209 สี) → เปลี่ยนธีมไม่ได้
ไฟล์นี้วาง "semantic token" ทับ แล้วแมปสีที่ใช้บ่อยที่สุดไปที่ token
(ดูสคริปต์ remap — แมปเฉพาะ property ที่ปลอดภัย:
background → surface · color → ink · border → border)
โหมดที่รองรับ (ดู ThemeSwitch.tsx)
light = สว่าง
dark = มืด
auto = ตามเวลาเครื่อง 06:00–18:00 = สว่าง, นอกนั้น = มืด
⚠️ DESIGN.md เป็นรัฐธรรมนูญ — สีแบรนด์คือ #7a4cc0 (ม่วง) ห้ามเปลี่ยนเป็นฟ้า
============================================================ */
:root {
color-scheme: light;
/* พื้นผิว */
--c-surface: #ffffff;
--c-surface-2: #faf7ff;
--c-surface-3: #f4f2fa;
/* ตัวอักษร */
--c-ink: #1f2a44;
--c-ink-2: #5f6b83; /* ปรับให้ผ่าน AA บนพื้นขาว (4.25 → 5.1) */
--c-ink-3: #8b94a8;
/* เส้นขอบ */
--c-border: #e7e2f6;
--c-border-2: #ebe8f4;
/* แบรนด์ */
--c-brand: #7a4cc0;
--c-brand-ink: #7a4cc0; /* ม่วงที่ใช้เป็น "ตัวอักษร" บนพื้น */
--c-brand-soft: #f4f0fb;
--c-on-brand: #ffffff;
/* โฟกัส (คีย์บอร์ด) */
--c-focus: #7a4cc0;
/* เงา */
--c-shadow: rgba(26, 18, 46, .10);
/* พื้นหลังหน้า (เข้มกว่าการ์ดเล็กน้อย) */
--c-bg: #f7f9fd;
/* tint พื้นผิวตามความหมาย (ม่วง/ชมพู/เขียว/เหลือง/ฟ้า) */
--c-tint-purple: #f4f1fb;
--c-tint-pink: #fff5f9;
--c-tint-green: #e8f8ef;
--c-tint-amber: #fffdf6;
--c-tint-cyan: #ecfeff;
/* สีความหมาย (ข้อความบนพื้น) */
--c-ok: #1f7a3d;
--c-warn: #8a6100;
--c-danger: #b02a37;
--c-info: #3071b8;
/* พื้นผิวโปร่งแสง (glass) */
--c-glass: rgba(255, 255, 255, .92);
--c-glass-70: rgba(255, 255, 255, .70);
--c-glass-24: rgba(255, 255, 255, .24);
}
:root[data-theme="dark"] {
color-scheme: dark;
--c-surface: #171225;
--c-surface-2: #1f1833;
--c-surface-3: #251d3d;
--c-ink: #ece9f7;
--c-ink-2: #a9a2c4;
--c-ink-3: #8d86ab;
--c-border: #352b52;
--c-border-2: #2c2444;
--c-brand: #7a4cc0;
--c-brand-ink: #b892f5; /* สว่างขึ้นเพื่อให้ผ่าน 4.5:1 บนพื้นมืด */
--c-brand-soft: #241b3b;
--c-on-brand: #ffffff;
--c-focus: #b892f5;
--c-shadow: rgba(0, 0, 0, .45);
--c-bg: #120e1e;
--c-tint-purple: #241c3b;
--c-tint-pink: #2e1a2a;
--c-tint-green: #15291f;
--c-tint-amber: #2b2416;
--c-tint-cyan: #16262b;
--c-ok: #6ee7a8;
--c-warn: #fbbf24;
--c-danger: #ff9db0;
--c-info: #7cc0ff;
--c-glass: rgba(23, 18, 37, .92);
--c-glass-70: rgba(23, 18, 37, .80);
--c-glass-24: rgba(255, 255, 255, .10);
}
/* ---------- ฐาน ---------- */
html {
background: var(--c-surface);
}
body {
color: var(--c-ink);
background: var(--c-bg);
}
/* ฟอร์ม/คอนโทรลใช้สีระบบให้เข้ากับธีม */
input,
select,
textarea,
button {
color-scheme: inherit;
}
/* ภาพที่อาจสว่างเกินไปบนพื้นมืด (โลโก้พาร์ทเนอร์/แผนที่) — ลดความจ้าเล็กน้อย */
:root[data-theme="dark"] img.mu-marquee-tile img,
:root[data-theme="dark"] .mu-marquee-tile img {
filter: brightness(.92);
}
/* กันจอขาววูบตอนสลับธีม */
@media (prefers-reduced-motion: no-preference) {
html,
body {
transition: background-color .18s ease, color .18s ease;
}
}
+1 -1
View File
@@ -1 +1 @@
{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.es2022.d.ts","./node_modules/typescript/lib/lib.es2023.d.ts","./node_modules/typescript/lib/lib.es2024.d.ts","./node_modules/typescript/lib/lib.esnext.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.es2022.array.d.ts","./node_modules/typescript/lib/lib.es2022.error.d.ts","./node_modules/typescript/lib/lib.es2022.intl.d.ts","./node_modules/typescript/lib/lib.es2022.object.d.ts","./node_modules/typescript/lib/lib.es2022.string.d.ts","./node_modules/typescript/lib/lib.es2022.regexp.d.ts","./node_modules/typescript/lib/lib.es2023.array.d.ts","./node_modules/typescript/lib/lib.es2023.collection.d.ts","./node_modules/typescript/lib/lib.es2023.intl.d.ts","./node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2024.collection.d.ts","./node_modules/typescript/lib/lib.es2024.object.d.ts","./node_modules/typescript/lib/lib.es2024.promise.d.ts","./node_modules/typescript/lib/lib.es2024.regexp.d.ts","./node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2024.string.d.ts","./node_modules/typescript/lib/lib.esnext.array.d.ts","./node_modules/typescript/lib/lib.esnext.collection.d.ts","./node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/typescript/lib/lib.esnext.disposable.d.ts","./node_modules/typescript/lib/lib.esnext.promise.d.ts","./node_modules/typescript/lib/lib.esnext.decorators.d.ts","./node_modules/typescript/lib/lib.esnext.iterator.d.ts","./node_modules/typescript/lib/lib.esnext.float16.d.ts","./node_modules/typescript/lib/lib.esnext.error.d.ts","./node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/@types/react/global.d.ts","./node_modules/csstype/index.d.ts","./node_modules/@types/prop-types/index.d.ts","./node_modules/@types/react/index.d.ts","./node_modules/next/dist/styled-jsx/types/css.d.ts","./node_modules/next/dist/styled-jsx/types/macro.d.ts","./node_modules/next/dist/styled-jsx/types/style.d.ts","./node_modules/next/dist/styled-jsx/types/global.d.ts","./node_modules/next/dist/styled-jsx/types/index.d.ts","./node_modules/next/dist/server/get-page-fLine truncated
{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.es2022.d.ts","./node_modules/typescript/lib/lib.es2023.d.ts","./node_modules/typescript/lib/lib.es2024.d.ts","./node_modules/typescript/lib/lib.esnext.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.es2022.array.d.ts","./node_modules/typescript/lib/lib.es2022.error.d.ts","./node_modules/typescript/lib/lib.es2022.intl.d.ts","./node_modules/typescript/lib/lib.es2022.object.d.ts","./node_modules/typescript/lib/lib.es2022.string.d.ts","./node_modules/typescript/lib/lib.es2022.regexp.d.ts","./node_modules/typescript/lib/lib.es2023.array.d.ts","./node_modules/typescript/lib/lib.es2023.collection.d.ts","./node_modules/typescript/lib/lib.es2023.intl.d.ts","./node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2024.collection.d.ts","./node_modules/typescript/lib/lib.es2024.object.d.ts","./node_modules/typescript/lib/lib.es2024.promise.d.ts","./node_modules/typescript/lib/lib.es2024.regexp.d.ts","./node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2024.string.d.ts","./node_modules/typescript/lib/lib.esnext.array.d.ts","./node_modules/typescript/lib/lib.esnext.collection.d.ts","./node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/typescript/lib/lib.esnext.disposable.d.ts","./node_modules/typescript/lib/lib.esnext.promise.d.ts","./node_modules/typescript/lib/lib.esnext.decorators.d.ts","./node_modules/typescript/lib/lib.esnext.iterator.d.ts","./node_modules/typescript/lib/lib.esnext.float16.d.ts","./node_modules/typescript/lib/lib.esnext.error.d.ts","./node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/@types/react/global.d.ts","./node_modules/csstype/index.d.ts","./node_modules/@types/prop-types/index.d.ts","./node_modules/@types/react/index.d.ts","./node_modules/next/dist/styled-jsx/types/css.d.ts","./node_modules/next/dist/styled-jsx/types/macro.d.ts","./node_modules/next/dist/styled-jsx/types/style.d.ts","./node_modules/next/dist/styled-jsx/types/global.d.ts","./node_modules/next/dist/styled-jsx/types/index.d.ts","./node_modules/next/dist/server/get-page-fLine truncated