:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20172f;
  background: #f7f4fc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.panel {
  width: min(720px, 100%);
  background: #fff;
  border: 1px solid #e8e0f2;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(59, 31, 103, 0.12);
  padding: clamp(24px, 5vw, 48px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.mark {
  width: 22px;
  height: 22px;
  border: 3px solid #7c3aed;
  border-radius: 50%;
  position: relative;
}

.mark::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 3px;
  border-radius: 999px;
  background: #7c3aed;
  right: -7px;
  bottom: -3px;
  transform: rotate(45deg);
}

.badge {
  font-size: 11px;
  font-weight: 650;
  color: #6d28d9;
  background: #f3eefe;
  border-radius: 999px;
  padding: 5px 9px;
}

h1 {
  margin: 36px 0 12px;
  font-size: clamp(32px, 6vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.intro {
  max-width: 590px;
  color: #6e6579;
  line-height: 1.65;
  margin: 0 0 28px;
}

.drop-zone {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 2px dashed #cfc2df;
  border-radius: 18px;
  background: #fbf9fe;
  cursor: pointer;
  overflow: hidden;
  padding: 20px;
  transition: border-color 120ms ease, background 120ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: #7c3aed;
  background: #f7f1ff;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-zone strong,
.drop-zone small {
  display: block;
}

.drop-zone strong {
  font-size: 17px;
}

.drop-zone small {
  color: #8b8197;
  margin-top: 8px;
}

#preview {
  max-width: 100%;
  max-height: 320px;
  border-radius: 12px;
  object-fit: contain;
}

button {
  font: inherit;
}

#search-button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #7c3aed;
  color: white;
  font-weight: 700;
  padding: 15px 22px;
  margin-top: 16px;
  cursor: pointer;
}

#search-button:hover {
  background: #6d28d9;
}

#search-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: #6e6579;
}

.status.error {
  color: #b42318;
}

.results {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid #ebe5f2;
}

.result-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: 22px;
}

h3 {
  margin: 0;
  font-size: 17px;
}

#expiry {
  color: #8b8197;
  font-size: 13px;
  margin: 7px 0 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: #6d28d9;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading p {
  margin: 5px 0 0;
  color: #8b8197;
  font-size: 13px;
}

.local-results {
  margin-top: 26px;
  padding: 20px;
  border-radius: 16px;
  background: #faf7ff;
  border: 1px solid #e6dcf4;
}

.owned-label {
  color: #166534;
  background: #ecfdf3;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.local-match-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.local-match {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e5ddec;
  border-radius: 12px;
  padding: 10px;
}

.local-match:hover {
  border-color: #9b72e6;
}

.local-match img {
  width: 72px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee9f5;
}

.local-match-copy {
  min-width: 0;
}

.local-match-copy strong,
.local-match-copy small {
  display: block;
}

.local-match-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-match-copy small {
  margin-top: 4px;
  color: #81768d;
}

.provider-heading {
  margin-top: 26px;
}

.provider-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.provider {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: inherit;
  text-decoration: none;
  border: 1px solid #e5ddec;
  border-radius: 14px;
  padding: 17px 18px;
  transition: border-color 120ms ease, transform 120ms ease;
}

.provider:hover {
  border-color: #9b72e6;
  transform: translateY(-1px);
}

.provider strong,
.provider small {
  display: block;
}

.provider small {
  color: #81768d;
  margin-top: 4px;
}

.provider .arrow {
  color: #7c3aed;
  font-size: 20px;
}

.privacy {
  color: #8b8197;
  font-size: 12px;
  line-height: 1.6;
  margin: 20px 0 0;
}

@media (max-width: 560px) {
  .result-heading {
    display: block;
  }

  .text-button {
    margin-top: 10px;
  }

  .provider {
    align-items: start;
  }
}
