:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0b0d10; color: #e6e8eb;
  margin: 0; padding: 16px;
  max-width: 720px; margin: 0 auto;
}
header { margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0; }
.meta { color: #8a9099; font-size: 12px; margin-top: 4px; }

.favs { margin-bottom: 12px; }
.favs-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px;
  min-height: 28px;
}
.favs-empty { color: #8a9099; font-size: 11px; font-style: italic; padding: 4px 0; }
.chip {
  background: #1a1d22; color: #e6e8eb;
  border: 1px solid #24272c; border-radius: 16px;
  padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.chip:hover { background: #24272c; border-color: #3ddc84; }
.favs-actions { display: flex; gap: 6px; }
.mini {
  background: transparent; color: #8a9099; border: 1px solid #24272c;
  padding: 4px 8px; border-radius: 6px; font-size: 11px; cursor: pointer;
}
.mini:hover { border-color: #3ddc84; color: #e6e8eb; }

.form { display: grid; gap: 10px; margin-bottom: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #8a9099; position: relative; }
.form input {
  background: #13161a; color: #e6e8eb;
  border: 1px solid #24272c; border-radius: 8px;
  padding: 10px; font-size: 14px; width: 100%;
}
button {
  background: #2d7dff; color: white; border: 0;
  padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
.swap {
  background: transparent; color: #8a9099; border: 1px solid #24272c;
  padding: 6px; font-size: 12px; font-weight: 500;
  justify-self: end; width: auto;
}
.swap:hover { border-color: #3ddc84; color: #e6e8eb; }

.suggest {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #13161a; border: 1px solid #24272c; border-radius: 8px;
  list-style: none; padding: 4px; margin: 2px 0 0;
  max-height: 180px; overflow-y: auto; z-index: 10;
  display: none;
}
.suggest.open { display: block; }
.suggest li {
  padding: 8px; border-radius: 6px; font-size: 13px; color: #e6e8eb;
  cursor: pointer;
}
.suggest li:hover { background: #1a1d22; }

.weights { margin-bottom: 16px; }
.weights summary { cursor: pointer; font-size: 12px; color: #8a9099; padding: 4px 0; }
.weights label { display: grid; grid-template-columns: 80px 1fr 24px; gap: 8px; align-items: center; font-size: 12px; padding: 4px 0; }

#status { font-size: 12px; color: #8a9099; min-height: 16px; margin-bottom: 8px; }

.option {
  border: 1px solid #24272c; border-radius: 10px;
  padding: 12px; margin-bottom: 10px;
  background: #13161a;
}
.option .hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.option .label { font-weight: 600; font-size: 14px; }
.option .score { font-size: 11px; color: #3ddc84; font-weight: 600; }
.option .stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  font-size: 12px; margin-bottom: 8px;
}
.option .stats div { background: #0f1216; border-radius: 6px; padding: 6px; text-align: center; }
.option .stats .k { color: #8a9099; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.option .stats .v { color: #e6e8eb; font-weight: 600; margin-top: 2px; }
.option .note { font-size: 11px; color: #8a9099; margin-top: 6px; font-style: italic; }
.option.best { border-color: #3ddc84; box-shadow: 0 0 0 1px #3ddc84 inset; }
.option.unavailable { opacity: 0.55; border-style: dashed; }

.fare-break { font-size: 11px; color: #b8bcc4; margin-bottom: 6px; padding: 4px 6px; background: #0f1216; border-radius: 4px; }

.time-band {
  font-size: 13px; color: #ffd166; font-weight: 600;
  margin-bottom: 8px; padding: 6px 8px; background: #1a1408; border-radius: 6px;
}
.alts { font-size: 11px; color: #8a9099; margin-bottom: 8px; font-style: italic; }

.steps { list-style: none; padding: 0; margin: 8px 0 0; border-top: 1px solid #24272c; padding-top: 8px; }
.step { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid #1a1d22; }
.step:last-child { border-bottom: 0; }
.step-icon {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  min-width: 42px; text-align: center;
  background: #1a1d22; color: #8a9099;
  border-radius: 4px; padding: 4px 2px; align-self: flex-start;
}
.step-body { flex: 1; font-size: 12px; line-height: 1.4; }
.step-title { color: #e6e8eb; font-weight: 500; margin-bottom: 2px; }
.step-instr { color: #b8bcc4; font-size: 11px; }
.step-time { color: #ffd166; font-size: 11px; margin-top: 2px; font-weight: 600; }
.live-eta { font-size: 11px; color: #8a9099; margin-top: 4px; padding: 3px 6px; background: #0f1216; border-radius: 4px; display: inline-block; }
.live-eta.eta-hit { color: #3ddc84; }
.live-eta.eta-miss { color: #8a9099; font-style: italic; }

footer { color: #8a9099; font-size: 11px; margin-top: 20px; text-align: center; }
