:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #18212a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.app {
  min-height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 10px 18px;
  background: #ffffff;
  border-bottom: 1px solid #d9e0e7;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 22px;
}

.brand p {
  margin: 0;
  color: #5a6875;
  font-size: 13px;
}

.results {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.resultPanel,
.conditionCard {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
}

.resultHeader {
  display: flex;
  gap: 24px;
  align-items: center;
  min-height: 48px;
  padding: 6px 14px;
  background: #fbfcfd;
  border-bottom: 1px solid #d9e0e7;
}

.resultHeader h2 {
  flex: 0 0 auto;
  font-size: 16px;
}

.summary {
  display: flex;
  gap: 22px;
  align-items: baseline;
  min-width: 0;
}

.summary > div {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}

.summary strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label,
label span {
  color: #5a6875;
  font-size: 12px;
  font-weight: 600;
}

label small {
  color: #6b7785;
  font-size: 11px;
}

.tableWrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6ebf0;
  text-align: left;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  position: sticky;
  top: 0;
  background: #eef2f5;
  color: #4b5966;
  font-size: 12px;
}

td {
  font-size: 14px;
}

.destination {
  border-left: 4px solid transparent;
  font-weight: 700;
}

.destination-up {
  background: #e8f4ff;
  border-left-color: #2374ab;
  color: #123f63;
}

.destination-down {
  background: #fff3df;
  border-left-color: #c76b12;
  color: #69380b;
}

.delay {
  color: #b42318;
  font-weight: 700;
}

.ontime {
  color: #1f7a4d;
  font-weight: 700;
}

.empty {
  padding: 32px;
  color: #5a6875;
  text-align: center;
}

.searchArea {
  padding: 0 18px 18px;
}

.searchArea > h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.conditionGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.conditionCard > h3 {
  padding: 12px 16px;
  background: #eef2f5;
  border-bottom: 1px solid #d9e0e7;
  font-size: 15px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 16px;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

input,
select,
button {
  width: 100%;
  height: 38px;
  border: 1px solid #c6d0da;
  border-radius: 6px;
  background: #ffffff;
  color: #18212a;
  font: inherit;
}

input,
select {
  padding: 0 10px;
}

.multiSelect {
  height: auto;
  min-height: 76px;
  padding: 4px;
}

.multiSelect option {
  padding: 4px 6px;
}

button {
  padding: 0 16px;
  background: #2364aa;
  border-color: #2364aa;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.65;
  cursor: progress;
}

.check {
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  height: 38px;
}

.check input {
  width: 18px;
  height: 18px;
}

.check span {
  color: #18212a;
  font-size: 14px;
}

@media (max-width: 1000px) {
  .conditionGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .results {
    padding: 12px;
  }

  .brand {
    padding: 9px 12px;
  }

  .searchArea {
    padding: 0 12px 12px;
  }

  .resultHeader {
    gap: 8px 16px;
    align-items: baseline;
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .summary {
    gap: 6px 16px;
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }
}
