:root {
--bg1: #f5f7ff;
--bg2: #eaf7ef;
--ink: #17202a;
--muted: #5d6773;
--card: #ffffff;
--line: #d8dee6;
--accent: #1166cc;
--danger: #c0392b;
}

*, *::before, *::after {
	box-sizing: border-box;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
color: var(--ink);
background: linear-gradient(135deg, var(--bg1), var(--bg2));
min-height: 100vh;
}

.wrap {
max-width: 680px;
margin: 0 auto;
padding: 16px;
}

.top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}

h1 {
font-size: 1.2rem;
margin: 0;
}

/* Collapsible card headers */
.card h2 {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	cursor: pointer;
}
.card .chev {
	color: var(--muted);
	font-size: 0.95rem;
	transform-origin: center;
	transition: transform 160ms ease;
}
.card.expanded .chev { transform: rotate(90deg); }

/* hide details when collapsed */
.card.collapsed .hint,
.card.collapsed .list {
	display: none;
}

button {
border: 1px solid var(--line);
background: var(--card);
color: var(--ink);
border-radius: 10px;
padding: 10px 14px;
font-weight: 600;
min-height: 44px;
}

.status {
color: var(--muted);
margin: 10px 0 14px;
}

.card {
background: var(--card);
border: 1px solid var(--line);
border-radius: 14px;
padding: 12px;
margin-bottom: 12px;
}

h2 {
margin: 0 0 8px;
font-size: 1.2rem;
}

.hint {
color: var(--muted);
font-size: 0.86rem;
margin-bottom: 8px;
}

.kmb-head {
margin-top: 12px;
}

.kmb-left {
color: #000000;
font-weight: 700;
}

.kmb-time {
color: #1166cc;
font-weight: 700;
font-size: 0.95rem;
white-space: nowrap;
	text-align: right;
	display: inline-block;
}

.kmb-sub {
	display: block;
	font-size: 0.82rem;
	color: var(--muted);
	font-weight: 400;
	margin-top: 2px;
	text-align: right;
}

.label-small {
	color: var(--muted);
	font-size: 0.86rem;
	font-weight: 400;
	margin-right: 6px;
}

.list {
margin: 0;
padding: 0;
list-style: none;
}

.list li {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 8px;
padding: 8px 0;
}

#kmbList {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid var(--line);
}

#kmb61List {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--line);
}

#mtr506List {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--line);
}

.big {
font-weight: 700;
color: var(--accent);
}

.small {
color: var(--muted);
font-size: 0.9rem;
}

.err {
color: var(--danger);
}

.lrt-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 36px auto;
align-items: center;
gap: 10px;
}

.lrt-left {
font-weight: 700;
color: #000000;
}

.lrt-time {
color: #1166cc;
font-weight: 700;
font-size: 0.95rem;
white-space: nowrap;
}

.lrt-train {
height: 20px;
width: auto;
display: block;
}

.lrt-train-empty {
display: inline-block;
width: 36px;
height: 20px;
}