:root {
  color-scheme: light;
  --ink: #111;
  --muted: #5f6570;
  --line: #e5e7eb;
  --blue: #dcecf4;
  --blue-ink: #00496f;
  --card: #fff;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
}

a {
  color: inherit;
}

.widget-shell {
  width: 100%;
  padding: 2px;
}

.widget-stack {
  display: grid;
  gap: 12px;
}

.widget-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px;
}

.widget-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.countdown {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.countdown-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--blue-ink);
}

.countdown-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.countdown-values {
  display: flex;
  gap: 10px;
  align-items: center;
}

.countdown-unit {
  min-width: 54px;
  text-align: center;
}

.countdown-number {
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weather-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.weather-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.weather-date {
  padding: 4px 2px;
  background: var(--blue);
  color: var(--blue-ink);
  text-align: center;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 500;
  white-space: nowrap;
}

.weather-city {
  padding: 4px 4px 3px;
  overflow: hidden;
  text-align: center;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-main {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 9px 4px 6px;
}

.weather-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.weather-temp {
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.weather-condition {
  padding: 3px 4px 6px;
  overflow: hidden;
  text-align: center;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

@media (max-width: 900px) {
  .weather-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

  .countdown-values {
    justify-content: space-between;
  }

  .countdown-unit {
    min-width: 0;
  }

  .weather-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
