* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

html {
  font-size: 20px;
}

body {
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #000;
  padding: 0.75rem;
  max-width: 824px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: none;
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.5rem;
  min-height: 0;
}

.panel {
  border: 2px solid #000;
  padding: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #000;
  padding-bottom: 0.2rem;
  margin-bottom: 0.3rem;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-content {
  font-size: 1rem;
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
}

/* Weather */
#weather .panel-content {
  display: flex;
  gap: 0.5rem;
}

#weather-current {
  flex: 1;
}

#weather-forecast {
  flex: 1;
}
.weather-temp {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.weather-conditions {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.weather-range {
  font-size: 1rem;
  font-weight: 500;
}

.weather-detail {
  font-size: 0.9rem;
  color: #333;
  margin-top: 0.15rem;
}

/* Lists */
ul {
  list-style: none;
}

li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

li:last-child {
  border-bottom: none;
}

.departure-time {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.departure-detail {
  font-size: 0.85rem;
  color: #333;
  text-align: right;
}

.departure-delay {
  font-size: 0.7rem;
  font-weight: 700;
}

.departure-dest {
  font-size: 0.7rem;
  color: #555;
}

.event-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 3.5rem;
}

.event-title {
  flex: 1;
  margin-left: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.all-day {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.loading {
  opacity: 0.4;
}

.error {
  color: #000;
  font-weight: 700;
}
