:root {
    --lrt-red: #d90000;
    --lrt-red-strong: #e00000;
    --lrt-red-dark: #b80000;
    --navy: #071529;
    --navy-soft: #0b172a;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #071529;
    --text-soft: #5b6472;
    --muted: #8a94a3;
    --border: #e1e5ea;
    --rail-muted: #f0a000;
    --shadow: 0 18px 44px rgba(7, 21, 41, 0.1);
    --shadow-soft: 0 10px 28px rgba(7, 21, 41, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --route-axis: clamp(46px, 3.75vw, 64px);
    --route-label-gap: clamp(20px, 1.45vw, 28px);
    --font-display: "Plus Jakarta Sans", Inter, "SF Pro Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-display);
    color: var(--text);
    background: var(--bg);
}

body {
    min-height: 100vh;
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

.noscript-banner {
    margin: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: #fff4f4;
    border: 1px solid rgba(217, 0, 0, 0.18);
    color: var(--lrt-red-dark);
    font-weight: 700;
}

.screen-shell {
    display: grid;
    grid-template-columns: minmax(300px, 23.75vw) minmax(0, 1fr);
    grid-template-rows: clamp(116px, 15.5vh, 158px) minmax(0, 1fr) clamp(72px, 9.8vh, 104px);
    grid-template-areas:
        "hero hero"
        "route main"
        "footer footer";
    width: 100vw;
    height: 100vh;
    padding: 0;
    background: var(--bg);
}

.hero-card {
    grid-area: hero;
    display: grid;
    grid-template-columns: minmax(260px, 25vw) minmax(0, 1fr) minmax(270px, 24vw);
    align-items: center;
    gap: 0;
    padding: clamp(18px, 1.55vw, 28px) clamp(32px, 3vw, 56px);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 18px rgba(7, 21, 41, 0.05);
}

.hero-left,
.hero-center,
.hero-right {
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-left {
    justify-content: flex-start;
    padding-right: clamp(28px, 3vw, 52px);
    border-right: 1px solid #c9ced6;
}

.hero-logo {
    width: clamp(150px, 13vw, 238px);
    height: auto;
    object-fit: contain;
}

.hero-center {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: clamp(42px, 5vw, 84px);
    padding-right: clamp(32px, 4vw, 72px);
    border-right: 1px solid #c9ced6;
}

.hero-center::before {
    content: "Stasiun";
    display: block;
    margin-bottom: 2px;
    font-size: clamp(1.02rem, 1.18vw, 1.45rem);
    line-height: 1;
    font-weight: 800;
    color: var(--text);
}

.station-title {
    margin: 0;
    max-width: 100%;
    color: var(--text);
    font-size: clamp(2.25rem, 3.18vw, 4.15rem);
    line-height: 0.92;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-address {
    display: block;
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: clamp(0.78rem, 0.9vw, 1.05rem);
    font-weight: 700;
    line-height: 1.1;
}

.station-address[hidden] {
    display: none;
}

.hero-right {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding-left: clamp(28px, 3vw, 56px);
}

.hero-meta-row {
    display: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--lrt-red);
    color: #fff;
    font-size: clamp(0.68rem, 0.72vw, 0.86rem);
    font-weight: 850;
}

.meta-chip-soft {
    background: #fff4f4;
    color: var(--lrt-red-dark);
    border: 1px solid rgba(217, 0, 0, 0.14);
}

.clock-card {
    width: auto;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-align: right;
    box-shadow: none;
}

.clock-time-wrap {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
}

.clock-main {
    font-size: clamp(2.75rem, 4.05vw, 4.85rem);
    font-weight: 950;
    line-height: 0.95;
    letter-spacing: 0;
}

.clock-seconds {
    display: none;
}

.clock-date {
    margin: 4px 0 0;
    color: var(--text);
    font-size: clamp(0.86rem, 0.98vw, 1.16rem);
    font-weight: 600;
}

.main-panel {
    display: contents;
}

.route-panel {
    grid-area: route;
    position: relative;
    display: grid;
    grid-template-columns: clamp(62px, 5.1vw, 92px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0;
    min-height: 0;
    background: var(--card);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.route-panel::before {
    content: "Rute LRT Jakarta";
    grid-row: 1 / -1;
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: linear-gradient(180deg, #e00000, #c90000);
    color: #fff;
    font-size: clamp(1.08rem, 1.26vw, 1.48rem);
    font-weight: 900;
    letter-spacing: 0;
}

.route-brand {
    display: none;
}

.lane-tags {
    grid-column: 2;
    display: contents;
}

.lane-tag {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    column-gap: var(--space-3);
    min-height: clamp(68px, 7.4vh, 90px);
    padding: clamp(16px, 1.65vw, 24px) clamp(22px, 2vw, 32px);
    color: var(--text);
    background: #fff;
    border: 0;
    font-size: 0;
    font-weight: 800;
    letter-spacing: 0;
}

.lane-tag::before {
    content: "Arah";
    display: block;
    grid-column: 1;
    margin: 0 0 4px;
    color: var(--text);
    font-size: clamp(0.78rem, 0.84vw, 0.96rem);
    font-weight: 650;
}

.lane-tag::after {
    grid-column: 1;
    color: var(--text);
    font-size: clamp(1.02rem, 1.24vw, 1.45rem);
    font-weight: 950;
    line-height: 1.05;
}

.lane-tag-up {
    grid-row: 1;
    border-bottom: 1px solid var(--border);
}

.lane-tag-up::after {
    content: "Velodrome";
}

.lane-tag-down {
    grid-row: 3;
    border-top: 1px solid var(--border);
}

.lane-tag-down::after {
    content: "Pegangsaan Dua";
}

.route-network {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    display: block;
    min-height: 0;
    height: 100%;
    padding: clamp(22px, 2.3vh, 32px) clamp(24px, 2.2vw, 36px);
}

.route-network::before,
.route-network::after {
    content: "";
    position: absolute;
    left: var(--route-axis);
    width: 4px;
    border-radius: 999px;
    transform: translateX(-50%);
}

.route-network::before {
    top: 5%;
    bottom: calc(100% - var(--current-progress, 50%));
    background: #f5a000;
}

.route-network::after {
    top: var(--current-progress, 50%);
    bottom: 5%;
    background: var(--lrt-red);
}

.route-stop {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: calc(var(--route-axis) + var(--route-label-gap)) minmax(0, 1fr) 0;
    align-items: center;
    min-height: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

.route-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: var(--route-axis);
    height: 100%;
}

.route-track.down {
    display: none;
}

.route-node {
    width: clamp(16px, 1.15vw, 20px);
    height: clamp(16px, 1.15vw, 20px);
    border-radius: 999px;
    border: 4px solid #f5a000;
    background: #fff;
    box-shadow: 0 0 0 4px #fff;
    transform: translateX(-50%);
}

.route-stop.is-current .route-node {
    width: clamp(26px, 2vw, 34px);
    height: clamp(26px, 2vw, 34px);
    border: 5px solid var(--lrt-red);
    box-shadow: 0 0 0 6px #fff, 0 0 0 9px rgba(217, 0, 0, 0.16);
}

.route-stop.is-current ~ .route-stop .route-node {
    border-color: var(--lrt-red);
}

.route-stop-copy {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: clamp(34px, 4.6vh, 52px);
    padding: 0 0 0 var(--space-2);
    background: transparent;
    border: 0;
    box-shadow: none;
}

.route-name {
    margin: 0;
    color: var(--text);
    font-size: clamp(0.86rem, 0.98vw, 1.16rem);
    font-weight: 850;
    line-height: 1.05;
}

.route-stop.is-current .route-name {
    color: var(--lrt-red);
    font-size: clamp(0.96rem, 1.08vw, 1.26rem);
    font-weight: 950;
}

.route-subtitle {
    margin: 3px 0 0;
    color: var(--text-soft);
    font-size: clamp(0.74rem, 0.82vw, 0.96rem);
    font-weight: 600;
    line-height: 1.1;
}

.train-chip {
    position: absolute;
    z-index: 4;
    left: var(--route-axis);
    width: clamp(26px, 1.9vw, 34px);
    height: clamp(26px, 1.9vw, 34px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    border: 2px solid rgba(217, 0, 0, 0.22);
    box-shadow: 0 8px 22px rgba(7, 21, 41, 0.16);
    transition: top 2.4s cubic-bezier(0.22, 1, 0.36, 1), transform 2.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.train-chip.lane-up,
.train-chip.lane-down {
    transform: translate(-50%, -50%);
}

.train-icon {
    width: 78%;
    height: 78%;
    object-fit: contain;
    border-radius: 999px;
}

.boards {
    grid-area: main;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 1.45vw, 26px);
    min-height: 0;
    padding: clamp(18px, 1.55vw, 28px);
    background: var(--bg);
}

.boards[data-columns="1"] {
    grid-template-columns: minmax(0, calc((100% - clamp(18px, 1.45vw, 26px)) / 2));
    justify-content: center;
}

.boards[data-columns="1"] .board-card {
    width: 100%;
}

.board-card,
.info-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.board-header,
.info-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(16px, 1.35vw, 24px);
    min-height: clamp(72px, 8.7vh, 96px);
    padding: clamp(16px, 1.35vw, 24px) clamp(22px, 1.85vw, 32px) clamp(12px, 1vw, 18px);
    border-bottom: 1px solid #cfd5de;
}

.board-title-wrap {
    min-width: 0;
}

.board-eyebrow,
.board-subtitle,
.info-copy,
.row-meta,
.empty-copy {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.35;
}

.board-eyebrow {
    margin-bottom: 3px;
    color: var(--text);
    font-size: clamp(0.88rem, 0.92vw, 1.08rem);
    font-weight: 650;
}

.board-title,
.info-title {
    margin: 0;
    color: var(--lrt-red);
    font-size: clamp(1.65rem, 2.12vw, 2.56rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.direction-arrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(36px, 2.9vw, 52px);
    height: clamp(36px, 2.9vw, 52px);
    border-radius: 999px;
    background: var(--lrt-red);
    box-shadow: 0 10px 22px rgba(217, 0, 0, 0.22);
}

.direction-arrow::before {
    content: "";
    width: 44%;
    height: 3px;
    border-radius: 999px;
    background: #fff;
}

.direction-arrow::after {
    content: "";
    position: absolute;
    width: 13px;
    height: 13px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
}

.direction-arrow-left::after {
    left: 29%;
    transform: rotate(-135deg);
}

.direction-arrow-right {
    order: 2;
}

.direction-arrow-right::after {
    right: 29%;
    transform: rotate(45deg);
}

.board-header:has(.direction-arrow-right) {
    grid-template-columns: minmax(0, 1fr) auto;
}

.board-body,
.info-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 clamp(22px, 1.85vw, 32px);
}

.next-train-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(98px, 8vw, 148px);
    align-items: center;
    min-height: clamp(122px, 16.8vh, 178px);
    margin-top: clamp(14px, 1.15vw, 20px);
    padding: clamp(18px, 1.6vw, 28px) clamp(22px, 1.9vw, 34px);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(135deg, #e00000 0%, #d50000 55%, #a90000 100%);
    color: #fff;
    overflow: hidden;
}

.next-train-label {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(0.92rem, 1vw, 1.2rem);
    font-weight: 800;
}

.next-train-value {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1vw, 18px);
}

.next-train-value strong {
    font-size: clamp(4.4rem, 5.65vw, 6.8rem);
    font-weight: 950;
    line-height: 0.82;
    letter-spacing: 0;
}

.next-train-value span {
    max-width: 120px;
    color: #fff;
    font-size: clamp(1.34rem, 1.65vw, 2.05rem);
    font-weight: 900;
    line-height: 1.08;
}

.next-train-value.is-arriving {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.next-train-value.is-arriving strong {
    display: block;
    font-size: clamp(3.35rem, 4.35vw, 5.4rem);
    line-height: 0.82;
}

.next-train-value.is-arriving span {
    display: block;
    max-width: none;
    margin-top: 0;
    font-size: clamp(1.1rem, 1.34vw, 1.65rem);
    line-height: 1;
}

.next-train-icon-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.next-train-icon-wrap::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(78px, 6.4vw, 118px);
    height: clamp(78px, 6.4vw, 118px);
    border-radius: 999px;
    border: 4px solid rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%);
}

.next-train-icon {
    position: relative;
    z-index: 1;
    width: clamp(74px, 5.9vw, 108px);
    height: clamp(86px, 6.8vw, 124px);
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.24));
}

.departure-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: clamp(58px, 7.4vh, 82px);
    padding: 0 clamp(24px, 2vw, 36px);
    background: #fff;
    border: 1px solid var(--border);
    border-top: 0;
}

.departure-row:last-of-type {
    border-radius: 0;
}

.row-time {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.78rem, 2.28vw, 2.78rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
}

.row-meta {
    display: none;
}

.countdown-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: clamp(92px, 8vw, 140px);
    color: var(--text-soft);
    background: transparent;
    border-radius: 0;
    font-size: clamp(0.98rem, 1.18vw, 1.42rem);
    font-weight: 650;
    text-align: right;
}

.countdown-badge.is-soon,
.countdown-badge.is-arriving {
    color: var(--text-soft);
    background: transparent;
}

.schedule-footer {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1vw, 18px);
    min-height: clamp(38px, 4.8vh, 56px);
    margin: 0 clamp(22px, 1.85vw, 32px) clamp(14px, 1.15vw, 20px);
    padding: 0 clamp(16px, 1.35vw, 24px);
    color: #607088;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    font-size: clamp(0.76rem, 0.82vw, 0.96rem);
    font-weight: 650;
}

.schedule-footer strong {
    color: #455266;
}

.ticket-icon {
    position: relative;
    width: 22px;
    height: 18px;
    flex: 0 0 22px;
    border: 2px solid #607088;
    border-radius: 4px;
}

.ticket-icon::before,
.ticket-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #607088;
    transform: translateY(-50%);
}

.ticket-icon::before {
    left: -6px;
}

.ticket-icon::after {
    right: -6px;
}

.empty-state,
.loading-card {
    margin-top: clamp(14px, 1.4vw, 24px);
    padding: clamp(22px, 2vw, 34px);
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px dashed #cfd5de;
    color: var(--text-soft);
}

.loading-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.1rem, 1.3vw, 1.6rem);
    font-weight: 750;
}

.empty-label {
    margin: 0 0 8px;
    color: var(--lrt-red);
    font-size: clamp(0.9rem, 1vw, 1.1rem);
    font-weight: 900;
    text-transform: uppercase;
}

.info-card .info-header {
    display: block;
}

.info-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.info-stat {
    padding: 16px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid var(--border);
}

.info-stat p,
.info-stat strong {
    margin: 0;
}

.info-stat p {
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
}

.info-stat strong {
    display: block;
    margin-top: 6px;
    color: var(--lrt-red);
    font-size: 1.35rem;
    font-weight: 950;
}

.footer-strip {
    grid-area: footer;
    position: relative;
    display: grid;
    grid-template-columns: clamp(170px, 13vw, 250px) minmax(0, 1fr) clamp(220px, 17vw, 320px);
    align-items: center;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(90deg, var(--navy), var(--navy-soft));
    border: 0;
    box-shadow: none;
}

.footer-strip::before {
    content: "ⓘ  Informasi";
    grid-column: 1;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 clamp(22px, 2vw, 34px);
    background: linear-gradient(180deg, #d90000, #bd0000);
    color: #fff;
    font-size: clamp(1.05rem, 1.25vw, 1.55rem);
    font-weight: 900;
}

.footer-strip::after {
    content: "◷  " attr(data-footer-time) "   ☁  28°C";
    grid-column: 3;
    position: relative;
    z-index: 2;
    justify-self: end;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: clamp(20px, 2vw, 34px);
    padding-right: clamp(28px, 3vw, 54px);
    background: var(--navy-soft);
    color: #fff;
    font-size: clamp(1rem, 1.25vw, 1.5rem);
    font-weight: 750;
    white-space: nowrap;
}

.footer-ticker {
    grid-column: 2;
    position: relative;
    z-index: 1;
    justify-self: start;
    padding-left: clamp(28px, 3vw, 54px);
    display: flex;
    align-items: center;
    gap: clamp(42px, 4vw, 78px);
    min-width: max-content;
    animation: footer-ticker-slide 60s linear infinite;
    will-change: transform;
}

.footer-ticker-text {
    margin: 0;
    color: #fff;
    font-size: clamp(1.15rem, 1.45vw, 1.72rem);
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}

@keyframes footer-ticker-slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 39px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-ticker {
        animation: none;
    }
}

@media (max-width: 1500px) {
    .screen-shell {
        grid-template-columns: minmax(276px, 24vw) minmax(0, 1fr);
        grid-template-rows: clamp(118px, 17vh, 154px) minmax(0, 1fr) clamp(66px, 10vh, 90px);
    }

    .boards {
        gap: 14px;
        padding: 14px;
    }

    .board-header {
        min-height: 82px;
        padding: 16px 18px 12px;
    }

    .board-body {
        padding-inline: 18px;
    }

    .schedule-footer {
        margin-inline: 18px;
    }

    .next-train-hero {
        grid-template-columns: minmax(0, 1fr) 104px;
        min-height: 128px;
        padding: 20px 24px;
    }

    .next-train-value strong {
        font-size: clamp(4.3rem, 6vw, 6.2rem);
    }
}

@media (max-width: 1200px) {
    .station-title {
        font-size: clamp(2.8rem, 5vw, 4.4rem);
    }

    .route-name {
        font-size: 0.95rem;
    }

    .route-stop.is-current .route-name {
        font-size: 1.12rem;
    }

    .board-title {
        font-size: clamp(1.65rem, 2.2vw, 2.2rem);
    }
}
