:root {
  color-scheme: dark;
  --bg: #000;
  --panel: rgba(8, 14, 18, 0.9);
  --panel-soft: rgba(14, 24, 30, 0.78);
  --text: #f8fbff;
  --muted: #9eb4bf;
  --cyan: #00d4ff;
  --green: #6cff8f;
  --yellow: #ffe86b;
  --line: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 600px;
  height: 600px;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
  color: inherit;
}

.app-shell {
  position: relative;
  width: 600px;
  height: 600px;
  padding: 20px;
  background: radial-gradient(circle at 50% 36%, rgba(0, 212, 255, 0.08), transparent 38%), #000;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 66px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 24px;
}

.status-pill {
  min-width: 96px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--yellow);
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  background: rgba(255, 232, 107, 0.08);
}

.screen {
  display: none;
  height: 408px;
}

.screen.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.command {
  width: 100%;
  min-height: 70px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  font-size: 20px;
  font-weight: 950;
}

.command.primary {
  border-color: rgba(0, 212, 255, 0.46);
  color: var(--cyan);
}

.station-list,
.arrival-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 324px;
  overflow: hidden;
}

.station-button,
.arrival-row,
.station-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.station-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 72px;
  padding: 9px 10px;
  border-width: 2px;
  text-align: left;
}

.station-button strong {
  display: block;
  font-size: 21px;
  line-height: 1.1;
}

.station-button small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.distance {
  color: var(--green);
  font-size: 18px;
  font-weight: 950;
}

.route-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.route-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #555;
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.station-card {
  padding: 9px 10px;
}

.station-card .eyebrow {
  font-size: 12px;
}

.station-card .route-pill {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  font-size: 13px;
}

.alert-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 300px;
  overflow: hidden;
}

.alert-row {
  min-height: 62px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 232, 107, 0.42);
  border-radius: 8px;
  background: rgba(255, 232, 107, 0.1);
}

.alert-row strong {
  display: block;
  color: var(--yellow);
  font-size: 15px;
  font-weight: 950;
}

.alert-row span {
  display: block;
  margin: 4px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.arrival-list {
  gap: 6px;
  margin-top: 8px;
  max-height: 236px;
}

.arrival-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 5px 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  text-align: left;
}

.arrival-row .route-pill {
  width: 30px;
  height: 30px;
}

.arrival-row strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.arrival-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.minutes {
  color: var(--yellow);
  font-size: 20px;
  font-weight: 950;
}

#screen-arrivals > .command {
  min-height: 50px;
  margin-top: 8px;
  font-size: 18px;
}

.pager-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.command.compact {
  min-height: 42px;
  font-size: 16px;
}

.command:disabled {
  opacity: 0.38;
}

.tabbar {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tab {
  min-height: 62px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(8, 18, 22, 0.9);
  color: var(--muted);
  font-size: 18px;
  font-weight: 950;
}

.tab.active {
  color: var(--text);
  border-color: rgba(108, 255, 143, 0.6);
}

.focusable {
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.focusable:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.5);
  transform: translateY(-1px);
}
