* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #f0f4f8;
  color: #1a202c;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

#app {
  max-width: 1100px;
  width: 100%;
}

h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

#tagline {
  text-align: center;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

#callout {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #c53030;
  margin-bottom: 1.5rem;
}

#search {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #cbd5e0;
  border-radius: 10px;
  outline: none;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}
#search:focus { border-color: #3182ce; }

#results {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#results li {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  flex: 1 1 180px;
  max-width: calc(20% - 0.5rem);
}
#results li:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,.1);
}

#results li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.2rem 0.6rem 1rem;
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 500;
  gap: 0.4rem;
  height: 100%;
  position: relative;
}
#results li a:hover { background: #ebf4ff; }

.flag {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.state-name {
  font-size: 0.85rem;
  line-height: 1.2;
}

.code {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  background: #e2e8f0;
  color: #4a5568;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  line-height: 1;
}

.note {
  font-size: 0.6rem;
  color: #b7791f;
  background: #fefcbf;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

.unavailable a { color: #718096 !important; cursor: default; }
.badge {
  background: #fefcbf;
  color: #975a16;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.deadline {
  font-size: 0.65rem;
  font-weight: 600;
  color: #4a5568;
  margin-top: auto;
  padding-top: 0.3rem;
  border-top: 1px solid #e2e8f0;
  width: 100%;
}

#banner {
  text-align: center;
  background: #2b6cb0;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}
#banner strong { display: block; font-size: 1rem; }
#banner span { font-size: 0.8rem; opacity: 0.85; }

#no-results {
  text-align: center;
  color: #a0aec0;
  padding: 2rem 0;
  width: 100%;
}

#footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #a0aec0;
  width: 100%;
}

/* mobile */
@media (max-width: 700px) {
  body { padding: 1rem 0.6rem; }

  h1 { font-size: 1.35rem; margin-bottom: 0.25rem; }
  #tagline { font-size: 0.85rem; margin-bottom: 1rem; }

  #banner {
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  #banner strong { font-size: 0.9rem; }
  #banner span { font-size: 0.72rem; }

  #search {
    font-size: 1rem;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 8px;
  }

  #results { flex-direction: column; gap: 0.25rem; }
  #results li {
    max-width: 100%;
    border-radius: 8px;
    flex-basis: auto;
  }
  #results li a {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    text-align: left;
    padding: 0.4rem 0.55rem;
    position: relative;
    height: auto;
  }

  .flag { width: 28px; height: 19px; border-radius: 2px; flex-shrink: 0; }

  .state-name {
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
  }

  .code {
    position: absolute;
    top: 0.25rem;
    right: 0.35rem;
    font-size: 0.5rem;
  }

  .note {
    font-size: 0.55rem;
    width: 100%;
    padding-left: 0;
    margin: 0;
  }

  .deadline {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    width: 100%;
    text-align: left;
    font-size: 0.6rem;
    color: #718096;
  }

  #footer { margin-top: 1.5rem; font-size: 0.75rem; }
}
