:root{--primary:#4a90d9;--primary-light:#6ba5e7;--primary-dark:#3a7bc8;--background:#f5f7fa;--card:#fff;--text:#2d3748;--text-muted:#718096;--border:#d9e2ec;--green:#48bb78;--yellow:#ecc94b;--red:#f56565;--gray:#a0aec0;--green-soft:#f0fff4;--yellow-soft:ivory;--red-soft:#fff5f5;--gray-soft:#f7fafc;--shadow:0 12px 32px #2d37481f}*{box-sizing:border-box}html{background:var(--background)}body{min-height:100vh;color:var(--text);background:radial-gradient(circle at top left, #4a90d924, transparent 34rem), linear-gradient(180deg, #eef6ff 0%, var(--background) 26rem);margin:0;font-family:Inter,Noto Sans TC,PingFang TC,Microsoft JhengHei,system-ui,sans-serif}button{font:inherit}.app-shell{width:min(100%,640px);margin:0 auto;padding:22px 16px 32px}.dashboard-header{text-align:center;padding:12px 0 18px}.bus-mark{background:var(--primary);color:#fff;border-radius:8px;place-items:center;min-width:72px;height:40px;margin-bottom:10px;font-size:18px;font-weight:800;display:inline-grid;box-shadow:0 6px 18px #4a90d942}.dashboard-header h1{letter-spacing:0;margin:0;font-size:clamp(28px,7vw,34px);line-height:1.18}.dashboard-header p{color:var(--text-muted);margin:8px 0 0;font-size:19px;line-height:1.45}.mode-selector{grid-template-columns:1fr 1fr;gap:10px;margin:6px 0 18px;display:grid}.mode-button{border:2px solid var(--border);background:var(--card);min-height:52px;color:var(--text);cursor:pointer;border-radius:8px;font-size:18px;font-weight:800;transition:transform .15s,background .15s,border-color .15s}.mode-button:last-child{grid-column:1/-1}.mode-button span+span{margin-left:6px}.mode-button.is-active{border-color:var(--primary);background:var(--primary);color:#fff}.mode-button:active,.refresh-button:active,.error-card button:active{transform:scale(.97)}.mode-button:disabled,.refresh-button:disabled{cursor:not-allowed;opacity:.68}.update-line{color:var(--text-muted);justify-content:space-between;align-items:center;gap:12px;margin:4px 2px 12px;font-size:15px;font-weight:700;display:flex}.bus-card-list{gap:14px;display:grid}.bus-card,.empty-card,.error-card,.loading-card{background:var(--card);box-shadow:var(--shadow);border-radius:8px}.bus-card{border-left:7px solid var(--gray);padding:18px;animation:.3s both card-in;position:relative;overflow:hidden}.card-green{border-left-color:var(--green);background:linear-gradient(90deg, var(--green-soft), var(--card) 38%)}.card-yellow{border-left-color:var(--yellow);background:linear-gradient(90deg, var(--yellow-soft), var(--card) 38%)}.card-red{border-left-color:var(--red);background:linear-gradient(90deg, var(--red-soft), var(--card) 38%)}.card-gray{border-left-color:var(--gray);background:linear-gradient(90deg, var(--gray-soft), var(--card) 38%)}.card-topline{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.mode-label{color:var(--text-muted);margin:0 0 3px;font-size:15px;font-weight:800}.bus-card h2{letter-spacing:0;margin:0;font-size:32px;line-height:1}.status-badge{max-width:210px;color:var(--text);align-items:center;gap:7px;font-size:15px;font-weight:800;line-height:1.35;display:inline-flex}.status-dot{background:currentColor;border-radius:50%;flex:none;width:14px;height:14px}.status-green{color:var(--green)}.status-yellow{color:#a76b00}.status-red{color:var(--red);animation:1.4s ease-in-out infinite pulse-red}.status-gray{color:#697586}.stop-pair{color:var(--text-muted);margin:12px 0 16px;font-size:18px;font-weight:800;line-height:1.45}.main-arrival{gap:4px;margin:0 0 14px;display:grid}.main-arrival span{color:var(--text-muted);font-size:17px;font-weight:800}.main-arrival strong{color:var(--text);letter-spacing:0;font-size:clamp(36px,9vw,48px);line-height:1.12}.next-arrivals{background:#ffffffb8;border:1px solid #d9e2ecbf;border-radius:8px;gap:8px;margin:0 0 16px;padding:12px 14px;display:grid}.next-arrivals p{color:var(--text-muted);justify-content:space-between;align-items:baseline;gap:12px;margin:0;font-size:17px;display:flex}.next-arrivals strong{color:var(--text);font-size:18px}.simple-route-map{gap:0;margin:0;padding:4px 0 0;list-style:none;display:grid}.simple-route-map li{min-height:34px;color:var(--text);align-items:center;font-size:16px;font-weight:800;display:flex;position:relative}.simple-route-map li:not(:last-child):after{content:"";background:var(--border);width:2px;height:25px;position:absolute;top:23px;left:8px}.route-node{border:3px solid var(--primary);background:#fff;border-radius:50%;width:18px;height:18px;margin-right:12px}.simple-route-map .is-middle .route-node{background:var(--primary)}.empty-card,.error-card,.loading-card{text-align:center;justify-items:center;gap:12px;margin:8px 0 14px;padding:28px 18px;display:grid}.empty-card strong,.error-card p{margin:0;font-size:22px;line-height:1.5}.empty-card span{color:var(--text-muted);font-size:17px}.error-face{font-size:44px}.error-card button{background:var(--primary);color:#fff;cursor:pointer;border:0;border-radius:8px;min-height:48px;padding:0 22px;font-size:18px;font-weight:800}.loading-card{align-items:stretch}.loading-card p{color:var(--text-muted);margin:4px 0 0;font-size:18px;font-weight:800}.skeleton{background:#e7eef6;border-radius:8px;overflow:hidden}.skeleton:after{content:"";background:linear-gradient(90deg,#0000,#ffffffad,#0000);height:100%;animation:1.2s infinite shimmer;display:block;transform:translate(-100%)}.skeleton-short{width:48%;height:22px}.skeleton-long{width:82%;height:24px}.skeleton-tall{width:100%;height:84px}.refresh-area{background:linear-gradient(180deg, transparent, var(--background) 26%);text-align:center;margin-top:18px;padding:14px 0 2px;position:sticky;bottom:0}.refresh-button{background:var(--primary);color:#fff;cursor:pointer;border:0;border-radius:8px;width:min(100%,520px);min-height:56px;font-size:20px;font-weight:900;transition:transform .15s,background .15s;box-shadow:0 10px 24px #4a90d942}.refresh-button:hover:not(:disabled){background:var(--primary-light)}.refresh-button:disabled{background:var(--gray);box-shadow:none}@keyframes shimmer{to{transform:translate(100%)}}@keyframes card-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse-red{0%,to{opacity:1}50%{opacity:.72}}@media (min-width:560px){.app-shell{padding-top:30px}.mode-selector{grid-template-columns:repeat(3,1fr)}.mode-button:last-child{grid-column:auto}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}
