
body {
    font-family: 'NotoSans-looped', 'Google Sans', sans-serif;
    background-color: #f4f4f5;
}

.noto-bold { font-weight: 700; }

.ss-wrap { max-width: 980px; }

.ss-line-status { display: flex; flex-direction: column; gap: 10px; }

.ss-line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: .6rem; }
@media (max-width: 575.98px){ .ss-line-grid { grid-template-columns: 1fr; gap: .5rem; } }

.ss-line-card {
    display: flex; align-items: center; gap: .7rem; cursor: pointer;
    border: 1px solid #e8edf3; border-radius: .85rem;
    padding: .7rem .8rem; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.05);
    transition: box-shadow .14s, transform .08s, border-color .14s;
}
.ss-line-card:hover { box-shadow: 0 6px 16px rgba(16,24,40,.1); transform: translateY(-2px); border-color: #d7e0ec; }
.ss-ico {
    width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.12rem; color: #fff;
}
.ss-ico.lv-ok { background: #18a558; } .ss-ico.lv-warn { background: #f0a012; } .ss-ico.lv-stop { background: #e0344b; }
.ss-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.22; }
.ss-name { font-weight: 700; font-size: .97rem; color: #1c2b45; }
.ss-status { font-size: .9rem; font-weight: 700; margin-top: .05rem; }
.ss-sub { font-size: .78rem; color: #8a95a6; margin-top: .05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-line-card.lv-ok   .ss-status { color: #16864a; }
.ss-line-card.lv-warn .ss-status { color: #b9780a; }
.ss-line-card.lv-stop { border-color: #f6d5da; background: #fff7f8; }
.ss-line-card.lv-stop .ss-status { color: #cc2d44; }
.ss-line-card.lv-stop .ss-sub { color: #c25563; }
@media (max-width: 767.98px){ .ss-line-grid.has-inc .ss-line-card.lv-ok { display: none; } }

.ss-allok {
    display: flex; align-items: center; gap: .6rem;
    background: #eaf7ef; border: 1px solid #d3ecdc; color: #1f7a3d;
    border-radius: .8rem; padding: .75rem 1rem; font-weight: 700; font-size: .95rem;
}
.ss-allok .ss-ico { width: 2rem; height: 2rem; font-size: 1rem; }

[data-bs-theme="dark"] .ss-line-card { background: #1d1f24; border-color: #2c2f37; box-shadow: none; }
[data-bs-theme="dark"] .ss-line-card:hover { border-color: #3a3f4a; }
[data-bs-theme="dark"] .ss-line-card.lv-stop { background: #271519; border-color: #4a242b; }
[data-bs-theme="dark"] .ss-name { color: #e4ebf5; }
[data-bs-theme="dark"] .ss-sub { color: #828d9e; }
[data-bs-theme="dark"] .ss-line-card.lv-ok   .ss-status { color: #5fcf8b; }
[data-bs-theme="dark"] .ss-line-card.lv-warn .ss-status { color: #ecb44b; }
[data-bs-theme="dark"] .ss-line-card.lv-stop .ss-status { color: #f3899a; }
[data-bs-theme="dark"] .ss-line-card.lv-stop .ss-sub { color: #cf8a93; }
[data-bs-theme="dark"] .ss-allok { background: #14301d; color: #7fd69b; border-color: #205232; }

.ss-hero {
    display: flex; align-items: center; gap: 14px;
    background: #e9f7ef; border: 1.5px solid #37b24d; border-radius: 14px;
    padding: 15px 16px; margin-bottom: 12px;
}
.ss-hero .ss-hero-ic {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%;
    background: #2f9e44; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.ss-hero .ss-hero-t1 { font-size: 1.14rem; font-weight: 800; color: #1e6b34; line-height: 1.25; }
.ss-hero .ss-hero-t2 { font-size: .8rem; color: #4a7a58; margin-top: 2px; }
[data-bs-theme="dark"] .ss-hero { background: #14301d; border-color: #2f7d43; }
[data-bs-theme="dark"] .ss-hero .ss-hero-t1 { color: #8fe3ab; }
[data-bs-theme="dark"] .ss-hero .ss-hero-t2 { color: #7fb090; }

.ss-sublines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ss-subline {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: #fff; border: 1px solid #e2e4e8; border-radius: 10px;
    padding: 10px 13px; font-size: .92rem; color: #333; cursor: pointer;
    transition: background .12s, border-color .12s;
}
.ss-subline:hover { border-color: #cfd6e0; background: #f6f8fb; }
.ss-subline .ss-sl-n { font-weight: 800; color: #8c1515; margin: 0 3px; }
.ss-subline .ss-sl-go { color: #999; font-size: .85rem; white-space: nowrap; }
[data-bs-theme="dark"] .ss-subline { background: #232323; border-color: rgba(255,255,255,.12); color: #e6edf3; }
[data-bs-theme="dark"] .ss-subline:hover { background: #2b2b2b; border-color: rgba(255,255,255,.2); }
[data-bs-theme="dark"] .ss-subline .ss-sl-n { color: #ff9b95; }
[data-bs-theme="dark"] .ss-subline .ss-sl-go { color: #8a95a6; }

.ss-chips-h { font-size: .8rem; color: #6b7280; margin: 2px 2px 7px; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 6px; }
.ss-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: #fff; border: 1px solid #cfe6d6; border-radius: 999px;
    padding: 6px 12px; font-size: .82rem; color: #2c5c3b;
}
.ss-chip .ss-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f9e44; flex: 0 0 8px; }
[data-bs-theme="dark"] .ss-chips-h { color: #9aa4ad; }
[data-bs-theme="dark"] .ss-chip { background: #1b2a1f; border-color: #2f5738; color: #9fd9b4; }

.ss-line-card.ss-noclick { cursor: default; }
.ss-line-card.ss-noclick:hover { box-shadow: 0 1px 2px rgba(16,24,40,.05); transform: none; border-color: #e8edf3; }
[data-bs-theme="dark"] .ss-line-card.ss-noclick:hover { border-color: #2c2f37; box-shadow: none; }

.ss-map-panel {
    background: #0e1626;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.12);
    opacity: .96;
}
.ss-map-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 4px;
    color: #cdd8ea;
}
.ss-map-title { font-size: .92rem; color: #cdd8ea; }
#map-container { width: 100%; height: auto; padding: 0 8px 4px; }
#map-container .srt-geo-svg { display: block; width: 100%; height: auto; }
.ss-map-nav { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; padding: 8px 12px 4px; }
.ss-map-nav .btn { font-size: .8rem; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-zpill { border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.06); color: #dbe6f5; border-radius: 999px; padding: .24rem .72rem; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.ss-zpill:hover { background: rgba(255,255,255,.16); color: #fff; }
.ss-zpill.cur { background: #e0344b; color: #fff; border-color: #e0344b; }
.ss-map-hint { color: #6b7a93; padding: 4px 12px 9px; }

.ss-section {
    background: #fff;
    border: 1px solid #e3e3e6;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.ss-section-head {
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ss-empty { color: #2e7d32; font-size: .9rem; padding: 4px 2px; }
.ss-empty .fa-circle-check { margin-right: 6px; }

.ss-item {
    border-top: 1px solid #f0f0f2;
    padding: 9px 2px;
    font-size: .92rem;
}
.ss-item:first-child { border-top: none; }
.ss-item .si-sub { color: #777; font-size: .8rem; margin-top: 2px; }

.ss-subgroup { margin-top: 10px; }
.ss-subgroup-head {
    font-size: .82rem; font-weight: 700; color: #8a6d00;
    background: #fff7e0; border-radius: 7px;
    padding: 4px 9px; display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 2px;
}
.ss-subgroup-badge { margin-left: 4px; padding: 0 7px; border-radius: 9px; background: rgba(0,0,0,.10); font-size: .74rem; font-weight: 800; }
[data-bs-theme="dark"] .ss-subgroup-badge { background: rgba(255,255,255,.14); }
.ss-subgroup .ss-item:first-child { border-top: 1px solid #f0f0f2; }

.inc-card {
    border: 1px solid #eee;
    border-left: 6px solid var(--inc-color, #b71c1c);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 8px 0;
    cursor: pointer;
    transition: box-shadow .15s;
}
.inc-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.inc-card .ic-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    color: var(--inc-fg, #fff);
    background: var(--inc-color, #b71c1c);
    border-radius: 20px;
    padding: 1px 10px;
    margin-bottom: 4px;
}
.inc-card.resolved { border-left-color: #2e7d32; background: #f4f8f4; }
.inc-card.resolved .ic-badge { background: #2e7d32; }
.inc-card.resolved .ic-title { color: #5a6b5a; font-weight: 600; }
[data-bs-theme="dark"] .inc-card.resolved { background: #16211a; border-color: #24402c; }
[data-bs-theme="dark"] .inc-card.resolved .ic-title { color: #9db3a3; }
.inc-card .ic-title { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.inc-card .ic-foot { color: #888; font-size: .78rem; margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.ss-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ss-tab {
    flex: 1 1 0; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 10px;
    border: 1px solid #e3e3e6; background: #fff; border-radius: 10px;
    font-size: .9rem; font-weight: 700; color: #55606f;
    cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.ss-tab i { font-size: .95rem; opacity: .8; }
.ss-tab .ss-tab-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-tab:hover { border-color: #cfd6e0; background: #f6f8fb; }
.ss-tab.ss-cur { background: #540906; border-color: #540906; color: #fff; }
.ss-tab.ss-cur i { opacity: 1; }
.ss-tab-count {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: #e0344b; color: #fff; font-size: .75rem; font-weight: 700;
    display: none; align-items: center; justify-content: center; line-height: 1;
}
.ss-tab-count:not(:empty) { display: inline-flex; }
.ss-tab.ss-cur .ss-tab-count { background: rgba(255,255,255,.28); }

.ss-tabpane { display: none; }
.ss-tabpane.ss-cur { display: block; }

.tv-stickyfoot { display: flex; flex-direction: column; min-height: 100vh; }
.tv-stickyfoot .footerType { margin-top: auto; }
.footerType { background-color: #f4f4f5; font-size: .85rem; color: #666; }

@media (max-width: 576px) {
    .ss-map-title { font-size: .86rem; }
    #map-container { min-height: 220px; }
    .ls-card .lc-state { font-size: 1.08rem; }
    .ls-card .lc-line { font-size: .96rem; }
    .ss-tabs { gap: 5px; }
    .ss-tab { flex-direction: column; gap: 3px; padding: 8px 5px; font-size: .78rem; }
    .ss-tab .ss-tab-label { max-width: 100%; }
}

.major-banner {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: var(--mb-color, #b71c1c); color: var(--mb-fg, #fff);
  border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  animation: mbpulse 2.2s ease-in-out infinite;
}
.major-banner:hover { filter: brightness(1.08); }
.major-banner .mb-icon { font-size: 1.5rem; flex: 0 0 auto; }
.major-banner .mb-text { flex: 1 1 auto; min-width: 0; }
.major-banner .mb-head { font-size: .75rem; opacity: .85; letter-spacing: .03em; }
.major-banner .mb-title { font-weight: 700; font-size: 1.02rem; }
.major-banner .mb-go { flex: 0 0 auto; opacity: .8; }
@keyframes mbpulse { 0%,100% { box-shadow: 0 2px 10px rgba(0,0,0,.25); } 50% { box-shadow: 0 2px 18px rgba(183,28,28,.55); } }

[data-bs-theme="dark"] body { background-color: #181818; }

[data-bs-theme="dark"] .ls-chip {
    background: #232323;
    border-color: rgba(255,255,255,.12);
}
[data-bs-theme="dark"] .ls-chip .lc-line { color: #e6edf3; }

[data-bs-theme="dark"] .ls-allok {
    background: #14301d;
    border-color: #205232;
    color: #7fd69b;
}

[data-bs-theme="dark"] .ss-section {
    background: #232323;
    border-color: rgba(255,255,255,.10);
}
[data-bs-theme="dark"] .ss-section-head { color: #e6edf3; }
[data-bs-theme="dark"] .ss-item { border-top-color: rgba(255,255,255,.08); color: #e6edf3; }
[data-bs-theme="dark"] .ss-item .si-sub { color: #9aa4ad; }
[data-bs-theme="dark"] .ss-subgroup .ss-item:first-child { border-top-color: rgba(255,255,255,.08); }
[data-bs-theme="dark"] .ss-empty { color: #7fd69b; }

[data-bs-theme="dark"] .ss-subgroup-head {
    background: #2e2611;
    color: #e0b64b;
}

[data-bs-theme="dark"] .inc-card {
    background: #232323;
    border-color: rgba(255,255,255,.10);
}
[data-bs-theme="dark"] .inc-card .ic-title { color: #e6edf3; }
[data-bs-theme="dark"] .inc-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.5); }

[data-bs-theme="dark"] .footerType { background-color: #232323; color: #9aa4ad; }

[data-bs-theme="dark"] .ss-tab { background: #232323; border-color: rgba(255,255,255,.12); color: #c3ccd8; }
[data-bs-theme="dark"] .ss-tab:hover { background: #2b2b2b; border-color: rgba(255,255,255,.22); }
[data-bs-theme="dark"] .ss-tab.ss-cur { background: #540906; border-color: #6e1512; color: #fff; }

.ss-knowbox {
    background: #eef4fb; border: 1px solid #cfe0f2; border-radius: 12px;
    padding: 12px 14px; margin-bottom: 12px; color: #2b4a6b;
}
.ss-knowbox-head { font-weight: 700; font-size: .98rem; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ss-knowbox p { margin: 0; font-size: .9rem; line-height: 1.55; }

.ss-search { position: relative; margin-bottom: 12px; }
.ss-search > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #8a97a8; font-size: .9rem; pointer-events: none; }
.ss-search input {
    width: 100%; padding: 10px 12px 10px 36px;
    border: 1px solid #d7dde5; border-radius: 10px; background: #fff;
    font-size: .95rem; color: #24303f; outline: none;
}
.ss-search input:focus { border-color: #540906; box-shadow: 0 0 0 2px rgba(84,9,6,.12); }
.ss-noresult { color: #6b7a93; font-size: .9rem; padding: 10px 2px; text-align: center; }

.sc-item .sc-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px; align-items: center;
}
.sc-item .sc-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.sc-item .sc-when { grid-column: 1 / -1; color: #55606f; font-size: .85rem; white-space: nowrap; }
@media (min-width: 640px) {
    .sc-item .sc-row  { grid-template-columns: minmax(0, 1fr) auto 130px; }
    .sc-item .sc-when { grid-column: auto; text-align: right; }
}
.sc-item.sc-active { border-left: 3px solid #b71c1c; padding-left: 9px; }
.sc-badge {
    flex: 0 0 auto; font-size: .74rem; font-weight: 700; border-radius: 20px;
    padding: 2px 10px; white-space: nowrap; line-height: 1.55; justify-self: start;
}
.sc-daily    { background: #eef4fb; color: #2b6cb0; }
.sc-range    { background: #eceff2; color: #55606f; }
.sc-until    { background: #fdecec; color: #b71c1c; }

[data-bs-theme="dark"] .ss-knowbox { background: #16232e; border-color: #244055; color: #bcd3e6; }
[data-bs-theme="dark"] .ss-search input { background: #232323; border-color: rgba(255,255,255,.14); color: #e6edf3; }
[data-bs-theme="dark"] .ss-search input:focus { border-color: #b6564f; box-shadow: 0 0 0 2px rgba(182,86,79,.18); }
[data-bs-theme="dark"] .ss-noresult { color: #9aa4ad; }
[data-bs-theme="dark"] .sc-until    { background: #3a1b1b; color: #ff9b95; }
[data-bs-theme="dark"] .sc-range    { background: #2a2f36; color: #b9c3cf; }
[data-bs-theme="dark"] .sc-daily    { background: #16283a; color: #7fb0e0; }
[data-bs-theme="dark"] .sc-item .sc-when  { color: #9aa4ad; }
[data-bs-theme="dark"] .sc-item.sc-active { border-left-color: #ff9b95; }

/* ══ การ์ดขบวนงดเดิน — รูปแบบเดียวกับการ์ด "ขบวนรถที่มีเหตุ" หน้าแรก [25/09/2569] ══ */
.ss-canx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .5rem; padding: 6px 0; }
@media (max-width: 575.98px) { .ss-canx-grid { grid-template-columns: 1fr; } }
.ss-canx-card { display: flex; align-items: flex-start; gap: .6rem; background: #fff7f8; border: 1px solid #f6d5da; border-radius: .75rem; padding: .6rem .7rem; }
.ss-canx-ico { width: 2.3rem; height: 2.3rem; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; background: #e0344b; margin-top: .15rem; }
.ss-canx-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; flex: 1; }
.ss-canx-issue { font-weight: 700; font-size: .9rem; color: #cc2d44; }
.ss-canx-train { font-size: .95rem; font-weight: 600; color: #1c2b45; }
.ss-canx-route { font-size: .85rem; color: #33415c; }
.ss-canx-route .fa-location-dot { color: #8a95a6; font-size: .78rem; }
.ss-canx-scope { font-size: .82rem; color: #b9780a; }
.ss-canx-sub { font-size: .76rem; color: #8a95a6; }
[data-bs-theme="dark"] .ss-canx-card { background: #271519; border-color: #4a242b; }
[data-bs-theme="dark"] .ss-canx-train { color: #e6edf3; }
[data-bs-theme="dark"] .ss-canx-route { color: #b9c4d6; }
[data-bs-theme="dark"] .ss-canx-sub { color: #828d9e; }

/* [26/09/2569 user] ตัวเลือกวัน + ตัวกรอง + กลุ่มตามวันออกต้นทาง · งดตลอดเส้นทาง (แดง) vs งดบางช่วง (ส้ม) */
.ss-canx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; padding: 4px 0 8px; }
.ss-canx-date { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; margin: 0; }
.ss-canx-date input { width: auto; }
.ss-canx-filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.ss-canx-fchip { border: 1px solid #c9d2df; background: transparent; color: inherit; border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; font-weight: 600; cursor: pointer; }
.ss-canx-fchip.cur { background: #1c2b45; color: #fff; border-color: #1c2b45; }
.ss-canx-fchip.full.cur { background: #e0344b; border-color: #e0344b; }
.ss-canx-fchip.part.cur { background: #d98a00; border-color: #d98a00; }
.ss-canx-fchip .n { opacity: .8; margin-left: .25rem; }
.ss-canx-dayhead { font-weight: 700; font-size: .92rem; margin: 10px 0 2px; }
.ss-canx-dayhead .note { font-weight: 400; font-size: .8rem; color: #8a95a6; margin-left: .35rem; }
.ss-canx-card.part { background: #fff9ec; border-color: #f3dca8; }
.ss-canx-card.part .ss-canx-ico { background: #d98a00; }
.ss-canx-card.part .ss-canx-issue { color: #a86a00; }
.ss-canx-card.part .ss-canx-scope { color: #8a5a00; font-weight: 600; }
.ss-canx-card.full .ss-canx-scope { color: #cc2d44; font-weight: 600; }
[data-bs-theme="dark"] .ss-canx-fchip { border-color: #45506a; }
[data-bs-theme="dark"] .ss-canx-card.part { background: #2a2210; border-color: #5a4518; }
[data-bs-theme="dark"] .ss-canx-card.part .ss-canx-issue, [data-bs-theme="dark"] .ss-canx-card.part .ss-canx-scope { color: #f0b54a; }
[data-bs-theme="dark"] .ss-canx-card.full .ss-canx-scope { color: #ff8a98; }

/* [27/09/2569 user] ผังขยายช่วงชานเมืองที่มีเหตุ (ใต้แผนที่ภูมิศาสตร์) */
.ss-map-inset { margin-top: 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 8px 10px; background: rgba(0,0,0,.18); }
.ss-map-inset-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 700; font-size: .9rem; color: #e8eef7; margin-bottom: 4px; }
.ss-map-inset-head .ss-zpill { font-size: .78rem; }
.ss-map-inset-open { margin-left: auto; }
#mapInsetBody { min-height: 160px; }
