Files
web-at-transit/frontend/src/styles/_shared.css
T
Bkk1234 0aea027fe2 dark: make dropdowns readable (select options + pop menus)
- theme.css: colour-scheme per theme for select/input/textarea and explicit
  option/optgroup colours (native popup was rendering light text on white in
  dark mode); :checked uses the purple tint
- _shared.css: token fallbacks on .mu-pop-* so the theme/language menus stay
  readable if tokens fail to load
- VERSION 2026.10.24.7
2026-11-04 02:24:36 +07:00

829 lines
24 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* =========================================================
Atroute shared polish — applied to all mockup pages
Loaded AFTER main-theme.css, BEFORE per-page <style>.
========================================================= */
/* ---------- Brand logo ---------- */
.mu-logo-img {
width: 44px;
height: 44px;
border-radius: var(--radius);
object-fit: cover;
box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
/* ---------- Universal "cover" card pattern ---------- */
/* A card whose top region is a 16:10 image hero with a soft
gradient overlay and a label sitting on top. Used by route
cards (index) and stop cards (busStop) so duplicate stock
photos no longer look bolted on. */
.mu-cover {
position: relative;
aspect-ratio: 16 / 10;
background: linear-gradient(135deg, var(--c-tint-purple) 0%, var(--c-tint-purple) 100%);
overflow: hidden;
}
.mu-cover > img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform .45s ease;
}
.mu-card:hover .mu-cover > img,
.mu-cover-card:hover .mu-cover > img {
transform: scale(1.06);
}
.mu-cover::after {
content: "";
position: absolute;
inset: 0;
background:
linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, .72) 100%);
pointer-events: none;
}
.mu-cover-tag {
position: absolute;
top: 12px;
left: 12px;
z-index: 1;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 10px;
border-radius: var(--radius-pill);
font-size: .72rem;
font-weight: 800;
letter-spacing: .02em;
background: var(--c-glass);
color: var(--c-ink);
backdrop-filter: blur(8px);
box-shadow: 0 4px 10px rgba(15, 23, 42, .15);
}
.mu-cover-title {
position: absolute;
left: 14px;
right: 14px;
bottom: 12px;
z-index: 1;
margin: 0;
color: #fff;
font-size: 1rem;
font-weight: 800;
line-height: 1.25;
text-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.mu-cover-title small {
display: block;
font-weight: 500;
font-size: .78rem;
opacity: .92;
margin-top: 2px;
}
.mu-cover.no-photo {
background:
radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .35), transparent 55%),
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, 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); }
.mu-cover.tone-amber { background: linear-gradient(135deg, #c47b1d, #fbbf24); }
/* ---------- Index route cards (rebuilt) ---------- */
.mu-card {
overflow: hidden;
transition: transform .18s ease, box-shadow .18s ease;
}
.mu-card:hover {
transform: translateY(-3px);
box-shadow: 0 18px 36px rgba(15, 23, 42, .14);
}
.mu-card-head {
position: relative;
height: auto;
aspect-ratio: 16 / 10;
overflow: hidden;
}
.mu-card-head .mu-card-photo {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform .45s ease;
}
.mu-card:hover .mu-card-photo { transform: scale(1.06); }
.mu-card-head::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, .72) 100%);
}
.mu-card-head .mu-route-number {
position: absolute;
left: 14px;
bottom: 12px;
margin: 0;
color: #fff;
font-weight: 900;
font-size: 32px;
letter-spacing: .02em;
text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
z-index: 1;
}
.mu-card-head .mu-route-kind {
position: absolute;
top: 12px;
left: 12px;
z-index: 1;
padding: 4px 10px;
border-radius: var(--radius-pill);
font-size: 0.72rem;
font-weight: 700;
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, var(--c-brand) 0%, #3071b8 100%);
}
.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); }
/* ---------- BusStop: integrated stop cards (no more
disjoint thumbnails) ---------- */
.mu-stop-grid li.mu-stop-cell {
list-style: none;
border-radius: var(--radius);
overflow: hidden;
box-shadow: 0 10px 24px rgba(63, 43, 94, .08);
border: 1px solid rgba(231, 224, 246, .95);
background: var(--c-surface);
display: flex;
flex-direction: column;
transition: transform .18s ease, box-shadow .18s ease;
}
.mu-stop-grid li.mu-stop-cell:hover {
transform: translateY(-3px);
box-shadow: 0 18px 36px rgba(63, 43, 94, .14);
}
.mu-stop-cell .mu-stop-card {
padding: 16px 18px 18px;
flex: 1;
display: flex;
flex-direction: column;
gap: 12px;
background: transparent;
}
/* ---------- Rich shared footer ---------- */
.mu-site-footer {
margin-top: 34px;
background:
radial-gradient(circle at 0% 0%, rgba(122, 76, 192, .35), transparent 35%),
radial-gradient(circle at 100% 10%, rgba(48, 113, 184, .35), transparent 35%),
linear-gradient(180deg, #1a1830 0%, #0f1126 100%);
color: #cfd5ec;
padding: 34px 0 0;
}
.mu-site-footer .mu-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 24px;
}
.mu-footer-grid {
display: grid;
grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
gap: 20px;
}
.mu-footer-brand {
display: flex;
flex-direction: column;
gap: 10px;
}
.mu-footer-brand-row {
display: flex;
align-items: center;
gap: 12px;
}
.mu-footer-brand-row img {
width: 48px;
height: 48px;
border-radius: var(--radius);
background: var(--c-surface);
padding: 4px;
object-fit: contain;
}
.mu-footer-brand-row strong {
display: block;
color: #fff;
font-size: 1rem;
font-weight: 800;
letter-spacing: .01em;
}
.mu-footer-brand-row span {
display: block;
color: var(--c-info);
font-size: 0.85rem;
margin-top: 2px;
}
.mu-footer-brand p.about {
margin: 0;
color: #b6bdda;
font-size: 0.85rem;
line-height: 1.6;
}
.mu-footer-col h4 {
margin: 0 0 10px;
color: #fff;
font-size: 0.95rem;
font-weight: 800;
letter-spacing: .03em;
text-transform: uppercase;
}
.mu-footer-col ul {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 3px;
}
.mu-footer-col ul a {
color: #cfd5ec;
text-decoration: none;
font-size: 0.95rem;
line-height: 1.5;
transition: color .15s ease;
display: inline-flex;
align-items: center;
gap: 8px;
}
.mu-footer-col ul a:hover { color: #fff; }
.mu-footer-col ul a::before {
content: "›";
color: var(--c-brand-ink);
font-weight: 800;
}
.mu-footer-contact a,
.mu-footer-contact span {
display: inline-flex;
align-items: center;
gap: 8px;
color: #cfd5ec;
text-decoration: none;
font-size: 0.85rem;
}
.mu-footer-contact .row { margin-bottom: 4px; }
/* ---------- Sponsor strip inside footer ---------- */
.mu-footer-sponsors {
margin-top: 22px;
padding-top: 16px;
border-top: 1px solid rgba(255, 255, 255, .08);
}
.mu-footer-sponsors h4 {
margin: 0 0 6px;
color: #fff;
font-size: .95rem;
font-weight: 800;
}
.mu-footer-sponsors p.lead {
margin: 0 0 18px;
color: var(--c-info);
font-size: .85rem;
line-height: 1.5;
}
.mu-sponsor-strip {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 12px;
}
.mu-sponsor-tile {
background: var(--c-surface);
border-radius: var(--radius);
padding: 14px;
display: flex;
align-items: center;
justify-content: center;
aspect-ratio: 5 / 3;
transition: transform .15s ease, box-shadow .15s ease;
border: 1px solid rgba(255, 255, 255, .04);
}
.mu-sponsor-tile:hover {
transform: translateY(-3px);
box-shadow: 0 12px 24px rgba(0, 0, 0, .35);
}
.mu-sponsor-tile img {
max-width: 84%;
max-height: 70%;
object-fit: contain;
filter: grayscale(.1);
transition: filter .2s ease;
}
.mu-sponsor-tile:hover img { filter: grayscale(0); }
/* ---------- Footer bottom bar ---------- */
.mu-footer-bottom {
margin-top: 20px;
padding: 12px 0 14px;
border-top: 1px solid rgba(255, 255, 255, .08);
text-align: center;
}
.mu-footer-bottom p {
margin: 0;
color: var(--c-info);
font-size: 0.85rem;
letter-spacing: .02em;
}
.mu-footer-bottom .pill {
display: inline-block;
margin-left: 10px;
padding: 2px 10px;
border-radius: var(--radius-pill);
background: rgba(122, 76, 192, .25);
color: #d8c7ff;
font-size: .72rem;
font-weight: 700;
}
/* Hide legacy thin footer when shared rich footer is present */
body:has(.mu-site-footer) .mu-footer { display: none; }
@media (max-width: 980px) {
.mu-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
.mu-footer-grid { grid-template-columns: 1fr; }
.mu-site-footer { padding: 28px 0 0; }
}
/* =========================================================
Icon system — Lucide (MIT) — ใช้ <svg class="ic"><use href="#ic-NAME"/></svg>
sprite: partials/icons-sprite.svg | credit: ui/credits.html
========================================================= */
.ic {
width: 1em;
height: 1em;
display: inline-block;
vertical-align: -0.125em;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
flex-shrink: 0;
}
.ic--lg { width: 1.4em; height: 1.4em; }
/* ---------- Search field (input + icon ข้างหน้า) ---------- */
.mu-search-field {
position: relative;
display: flex;
align-items: center;
flex: 1;
min-width: 220px;
}
.mu-search-field .ic {
position: absolute;
left: 12px;
color: var(--c-ink-2);
pointer-events: none;
}
.mu-search-field input {
width: 100%;
padding: 10px 12px 10px 38px;
}
/* ---------- ปุ่มสลับภาษา (ไทย / EN) ---------- */
.mu-lang-switch {
display: inline-flex;
align-items: center;
gap: 2px;
background: var(--c-tint-purple);
border: 1px solid #e4dcf2;
border-radius: var(--radius-pill);
padding: 3px;
flex-shrink: 0;
}
/* ============================================================
ปุ่ม + ฟอร์มคอนโทรล (shared — ทุกหน้าใช้ร่วมกัน)
.mu-btn อยู่ที่นี่ (ไม่ใช่ใน partial) → หน้าไหนก็ได้สไตล์เดียวกัน
============================================================ */
.mu-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 44px;
padding: 10px 18px;
border-radius: var(--radius);
font-family: inherit;
font-weight: 700;
font-size: .85rem;
line-height: 1;
text-decoration: none;
border: 1px solid transparent;
cursor: pointer;
transition: box-shadow .15s ease, transform .1s ease, background .15s ease, border-color .15s ease;
}
.mu-btn:active { transform: translateY(1px); }
.mu-btn.primary {
background: linear-gradient(135deg, #a855f7, #7c3aed);
color: #fff;
box-shadow: 0 8px 18px rgba(124, 58, 237, .25);
}
.mu-btn.primary:hover { box-shadow: 0 10px 22px rgba(124, 58, 237, .35); }
.mu-btn.ghost {
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: var(--c-surface-2); }
/* select แบบโมเดิร์น — custom chevron แทนลูกศร native (prefix #view ชนะ partial style) */
#view .mu-toolbar select {
appearance: none;
-webkit-appearance: none;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a4cc0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"), linear-gradient(180deg, #fff, #f8fbff);
background-repeat: no-repeat;
background-position: right 12px center;
padding-right: 38px;
cursor: pointer;
}
#view .mu-toolbar select:hover { border-color: #c8b4ec; }
#view .mu-toolbar input:hover { border-color: #c8b4ec; }
/* focus ring อันเดียวกันทั้งฟอร์ม — มองเห็นชัดตอน tab (a11y) */
#view .mu-toolbar input:focus-visible,
#view .mu-toolbar select:focus-visible,
#view .mu-toolbar .mu-btn:focus-visible {
outline: 2px solid var(--c-brand-ink);
outline-offset: 2px;
}
/* ปุ่มขอบ (outline) — ตัวอักษร/ขอบม่วง พื้นโปร่งใส
เดิมไม่มีกฎนี้ → เบราว์เซอร์ใส่พื้นเทาอ่อนเอง ทำให้โหมดมืดหลุดธีม */
.mu-btn.outline {
background: transparent;
border-color: var(--c-brand-ink);
color: var(--c-brand-ink);
}
.mu-btn.outline:hover {
background: var(--c-tint-purple);
border-color: var(--c-brand-ink);
}
/* ---------- ปุ่มติดตั้งแอป (PWA — inject จาก pwa.js) ---------- */
.mu-install-btn {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 100;
display: none; /* โผล่เมื่อ beforeinstallprompt เท่านั้น */
align-items: center;
gap: 8px;
min-height: 48px;
padding: 12px 20px;
border: none;
border-radius: var(--radius-pill);
cursor: pointer;
font-family: inherit;
font-size: .95rem;
font-weight: 700;
color: #fff;
background: linear-gradient(135deg, #a855f7, #7c3aed);
box-shadow: 0 10px 24px rgba(124, 58, 237, .35);
transition: transform .15s ease;
}
.mu-install-btn:active { transform: translateY(1px); }
.mu-install-btn svg { width: 20px; height: 20px; }
/* ============================================================
ปุ่ม "แชร์หน้านี้" — ใช้ร่วมทุกหน้า (/ · /stops/:code · /routes/:id · /check/:id)
เดิมอยู่ใน pages/home.css → หน้าอื่นไม่มีสไตล์เลย = หลุดธีม
ตอนนี้ยึดสเกลเดียวกับ .mu-btn ตาม DESIGN.md §5:
radius 12px · min-height 44px (48px บนจอสัมผัส) · font-size .85rem · weight 700
variant = ปุ่มรอง (ghost) เพราะไม่ใช่ CTA หลักของหน้า
============================================================ */
.mu-share-row {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8px;
margin: 22px 0 44px;
}
.mu-share-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 44px;
padding: 10px 18px;
border: 1px solid var(--c-border);
border-radius: var(--radius);
background: var(--c-surface);
color: var(--c-brand-ink);
font-family: inherit;
font-size: .85rem;
font-weight: 700;
line-height: 1;
cursor: pointer;
transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.mu-share-btn:hover {
border-color: #d8c9f2;
background: var(--c-surface-2);
}
.mu-share-btn:active { transform: translateY(1px); }
.mu-share-btn:focus-visible {
outline: 2px solid var(--c-focus);
outline-offset: 2px;
}
.mu-share-btn .ic { width: 16px; height: 16px; }
/* ข้อความใต้ปุ่ม */
.mu-share-status {
margin: 0;
font-size: 0.85rem;
line-height: 1.7;
color: var(--c-ink-2);
text-align: right;
}
.mu-share-status:empty { display: none; }
/* ลิงก์ที่คัดลอก — mono + tabular เพื่อให้อ่านง่าย/คัดลอกถูก */
.mu-share-url {
display: inline-block;
padding: 2px 8px;
border: 1px solid var(--c-border);
border-radius: var(--radius);
background: var(--c-tint-purple);
font-size: 0.78rem;
font-variant-numeric: tabular-nums;
word-break: break-all;
}
/* ปุ่มแชร์ผ่าน LINE — ม่วง (แอคเซนต์เดียวตาม DESIGN.md §7) ไม่ใช่เขียว */
.mu-share-line {
display: inline-block;
margin-left: 6px;
font-weight: 700;
color: var(--c-brand-ink);
text-decoration: none;
}
.mu-share-line:hover { text-decoration: underline; }
.mu-share-line:focus-visible {
outline: 2px solid var(--c-focus);
outline-offset: 2px;
}
/* จอแคบ: ปุ่มเต็มความกว้าง ข้อความชิดซ้าย */
@media (max-width: 560px) {
.mu-share-row { align-items: stretch; }
.mu-share-btn { justify-content: center; }
.mu-share-status { text-align: left; }
}
/* จอสัมผัส: 48dp ตาม Android guideline */
@media (pointer: coarse) {
.mu-share-btn { min-height: 48px; }
}
/* ============================================================
ปุ่มเครื่องมือในแถบนำทาง — ปุ่มละเรื่อง (ไม่ใช่กลุ่มปุ่มเรียง)
เดิม: ธีม 3 ปุ่ม + ภาษา 2 ปุ่ม = 5 ปุ่มในแถวเดียว → navbar แน่น
ตอนนี้: ธีม 1 ปุ่ม · ภาษา 1 ปุ่ม แต่ละปุ่มกดแล้วเปิดเมนูของตัวเอง
ตรงสเกลเดียวกับ .mu-btn (radius 8px · min-height 44px บนจอสัมผัส)
============================================================ */
.mu-topbar-tools {
display: flex;
align-items: center;
gap: 8px; /* WCAG 2.5.8 — เว้นระหว่างเป้ากด ≥ 8px */
flex-shrink: 0;
}
.mu-pop { position: relative; display: inline-flex; }
.mu-pop-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
min-width: 40px;
height: 40px;
padding: 0 8px;
border: 1px solid var(--c-border);
border-radius: var(--radius);
background: var(--c-surface);
color: var(--c-brand-ink);
font-family: inherit;
font-size: .78rem;
font-weight: 700;
line-height: 1;
cursor: pointer;
transition: border-color .15s ease, background .15s ease;
}
.mu-pop-btn-lang { min-width: 56px; padding: 0 10px; }
.mu-pop-btn:hover { border-color: #d8c9f2; background: var(--c-surface-2); }
.mu-pop-btn:active { transform: translateY(1px); }
.mu-pop-btn:focus-visible {
outline: 2px solid var(--c-focus);
outline-offset: 2px;
}
.mu-pop-btn[aria-expanded="true"] {
border-color: var(--c-brand-ink);
background: var(--c-surface-2);
}
/* เมนูที่กางออก */
.mu-pop-panel {
position: absolute;
top: calc(100% + 6px);
right: 0;
z-index: 1200; /* เหนือ topbar (1100) แต่ใต้ visitor dialog (3000) */
min-width: 168px;
padding: 6px;
border: 1px solid var(--c-border);
border-radius: var(--radius);
background: var(--c-surface);
box-shadow: 0 10px 24px var(--c-shadow);
}
.mu-pop-item {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
min-height: 40px;
padding: 8px 10px;
border: 0;
border-radius: var(--radius-sm);
background: transparent;
color: var(--c-ink);
font-family: inherit;
font-size: .85rem;
font-weight: 600;
text-align: start;
cursor: pointer;
}
.mu-pop-item:hover { background: var(--c-surface-2); }
.mu-pop-item:focus-visible {
outline: 2px solid var(--c-focus);
outline-offset: -2px;
}
.mu-pop-item[data-active="1"] {
background: var(--c-tint-purple);
color: var(--c-brand-ink);
font-weight: 700;
}
.mu-pop-item-th { flex: 1 1 auto; }
.mu-pop-item-en {
flex: 0 0 auto;
font-size: .72rem;
font-weight: 600;
color: var(--c-ink-2);
letter-spacing: .04em;
}
.mu-pop-item[data-active="1"] .mu-pop-item-en { color: var(--c-brand-ink); }
/* จอสัมผัส: เป้ากด 44px */
@media (pointer: coarse) {
.mu-pop-btn { min-width: 44px; height: 44px; }
.mu-pop-btn-lang { min-width: 60px; }
.mu-pop-item { min-height: 44px; }
}
/* รุ่นแอปที่แสดงท้ายเว็บ — ตัวเล็ก ๆ ไว้ตรวจว่าหน้านี้เป็น build ล่าสุดไหม */
.mu-app-ver {
margin-left: 6px;
font-family: ui-monospace, "IBM Plex Mono", monospace;
font-size: .72rem;
font-variant-numeric: tabular-nums;
color: var(--c-ink-2);
opacity: .85;
}
/* =========================================================
Motion (ported from web-at-transit-mock/ui/motion.js)
---------------------------------------------------------
โทเคนเดียวทั้งเว็บ: --mu-ease (deceleration) · 420ms เข้าหน้า
520ms reveal · 45ms/ชิ้น · แถบโหลดออกเร็วกว่าเข้า
========================================================= */
:root { --mu-ease: cubic-bezier(.22, .61, .36, 1); }
/* ---------- แถบโหลดบาง ๆ บนสุด (ตอนเปลี่ยนหน้า) ---------- */
.mu-loadbar {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 3px;
z-index: 1200;
pointer-events: none;
opacity: 0;
transition: opacity .25s ease;
}
.mu-loadbar.is-on { opacity: 1; }
.mu-loadbar-fill {
height: 100%;
width: 100%;
transform: scaleX(0);
transform-origin: 0 50%;
border-radius: 0 2px 2px 0;
background: linear-gradient(90deg, var(--c-brand), #b694f6);
box-shadow: 0 0 8px color-mix(in srgb, var(--c-brand) 45%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
#view.mu-view-in { animation: muViewIn .42s var(--mu-ease) both; }
@keyframes muViewIn {
from { opacity: 0; transform: translate3d(0, 10px, 0); }
to { opacity: 1; transform: none; }
}
.mu-reveal {
opacity: 0;
transform: translate3d(0, 18px, 0);
transition: opacity .52s var(--mu-ease), transform .52s var(--mu-ease);
transition-delay: var(--mu-d, 0ms);
}
.mu-reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
#view.mu-view-in { animation: none; }
.mu-reveal { opacity: 1; transform: none; transition: none; }
.mu-loadbar { display: none; }
}
/* =========================================================
Toast แจ้งอัปเดตเวอร์ชัน (สร้างจาก PwaBoot)
========================================================= */
.mu-update-toast {
position: fixed;
left: 50%;
bottom: calc(20px + env(safe-area-inset-bottom, 0px));
z-index: 1300;
display: inline-flex;
align-items: center;
gap: 10px;
max-width: calc(100vw - 32px);
padding: 10px 16px;
border-radius: 999px;
background: var(--c-ink);
color: var(--c-surface);
font-size: .82rem;
font-weight: 600;
line-height: 1.35;
box-shadow: 0 10px 24px var(--c-shadow);
transform: translate(-50%, 12px);
opacity: 0;
pointer-events: none;
transition: opacity .25s ease, transform .25s ease;
}
.mu-update-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.mu-update-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #b694f6;
flex: none;
animation: muUpdatePulse 1.1s ease-in-out infinite;
}
@keyframes muUpdatePulse {
0%, 100% { opacity: .35; transform: scale(.85); }
50% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
.mu-update-toast { transition: none; }
.mu-update-dot { animation: none; }
}
/* กันกรณีโทเคนโหลดไม่ครบ (เช่น cache เก่า) — dropdown ต้องอ่านออกเสมอ */
.mu-pop-panel { background: var(--c-surface, #fff); border-color: var(--c-border, #e7e2f6); }
:root[data-theme="dark"] .mu-pop-panel { background: var(--c-surface, #171225); border-color: var(--c-border, #352b52); }
.mu-pop-item { color: var(--c-ink, #1f2a44); }
:root[data-theme="dark"] .mu-pop-item { color: var(--c-ink, #ece9f7); }
.mu-pop-item[data-active="1"] { background: var(--c-tint-purple, #f4f1fb); color: var(--c-brand-ink, #7a4cc0); }
:root[data-theme="dark"] .mu-pop-item[data-active="1"] { background: var(--c-tint-purple, #241c3b); color: var(--c-brand-ink, #b892f5); }
.mu-pop-btn { background: var(--c-surface, #fff); color: var(--c-brand-ink, #7a4cc0); }
:root[data-theme="dark"] .mu-pop-btn { background: var(--c-surface, #171225); color: var(--c-brand-ink, #b892f5); }