/* Brandbattle navigation polish. Kept separate so it can be released safely. */
.app .topbar {
  position: relative;
  scrollbar-width: none;
}

.app .logo {
  gap: 4px;
}

.app .topbar::-webkit-scrollbar {
  display: none;
}

.app .topbar nav {
  position: absolute;
  left: 50%;
  gap: 2px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--surface) 92%, white),
    0 8px 24px color-mix(in srgb, var(--accent) 7%, transparent);
  transform: translateX(-50%);
}

.app .amount-picker span {
  margin-right: 4px;
  font-size: 42px;
}

.app .amount-picker strong {
  font-size: 46px;
}

.app .amount-picker button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 20px;
}

.app .amount-picker.first-place-target {
  margin: 0 auto 8px;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.app .amount-picker.first-place-target > span {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(25px, 3.2vw, 39px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -.045em;
}

.app .amount-picker.first-place-target > strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(72px, 9vw, 112px);
  line-height: .9;
  letter-spacing: -.07em;
}

.app .amount-picker.first-place-target > button {
  display: none;
}

.app .payment-amount-row {
  width: min(480px, 100%);
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.app .payment-amount-row::after {
  content: '';
}

.app .payment-amount-row > span {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.app .manual-amount-picker {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.app .manual-amount-picker > button {
  width: 36px;
  height: 36px;
  padding: 0 0 2px;
  display: grid;
  place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--accent) 72%, var(--line));
  border-radius: 50%;
  background: transparent;
  color: var(--accent-strong);
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}

.app .manual-amount-input {
  min-width: 116px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 0;
  color: var(--accent);
  font-family: var(--font-display);
}

.app .manual-amount-input input {
  width: 88px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 29px;
  font-weight: 760;
  letter-spacing: -.045em;
  text-align: right;
}

.app .manual-amount-input b {
  font-size: 24px;
}

.app .topbar nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  line-height: 1;
  transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.app .topbar nav a:hover,
.app .topbar nav a:focus-visible {
  background: var(--accent-pale);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.app .topbar nav a:focus-visible,
.app .theme-button:focus-visible,
.app .category-strip button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 62%, white);
  outline-offset: 2px;
}

.app .theme-button {
  min-height: 34px;
  padding: 7px 13px;
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
  box-shadow: 0 7px 20px color-mix(in srgb, var(--accent) 6%, transparent);
  transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.app .theme-button:hover {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  background: var(--accent-pale);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.app .select-field {
  position: relative;
  isolation: isolate;
}

.app .select-field::after {
  position: absolute;
  right: 19px;
  top: 50%;
  z-index: 2;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--accent-strong);
  border-bottom: 1.5px solid var(--accent-strong);
  content: "";
  pointer-events: none;
  transform: translateY(-68%) rotate(45deg);
  transition: transform .16s ease;
}

.app .select-field:has(select:open)::after {
  transform: translateY(-30%) rotate(225deg);
}

.app .select-field select {
  display: flex;
  align-items: center;
  appearance: none;
  padding: 0 46px 0 18px;
  border-radius: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.app .select-field select option {
  background: var(--surface);
  color: var(--text);
}

@supports (appearance: base-select) {
  .app .select-field select,
  .app .select-field select::picker(select) {
    appearance: base-select;
  }

  .app .select-field select {
    align-items: center;
    justify-content: flex-start;
  }

  .app .select-field select::picker-icon {
    display: none;
  }

  .app .select-field select::picker(select) {
    margin-top: 8px;
    padding: 7px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 96%, var(--accent-pale));
    color: var(--text);
    box-shadow: 0 18px 48px color-mix(in srgb, var(--text) 15%, transparent);
  }

  .app .select-field select option {
    min-height: 38px;
    margin: 2px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: transparent;
    transition: color .14s ease, background-color .14s ease;
  }

  .app .select-field select option:hover,
  .app .select-field select option:focus {
    background: var(--accent-pale);
    color: var(--accent-strong);
  }

  .app .select-field select option:checked {
    background: var(--accent);
    color: white;
  }

  .app .select-field select option::checkmark {
    color: currentColor;
  }
}

/* Legacy live release: new-brand details and one-click repeat top-up. */
.app .checkout-fields {
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) 210px;
}

.app .pay-button {
  white-space: nowrap;
}

.app .brand-link-field {
  grid-column: span 2;
}

.app .logo-field {
  height: 47px;
  padding: 5px 14px 5px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-pale));
  color: var(--accent-strong);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.app .logo-field:hover,
.app .logo-field:focus-within {
  border-color: var(--accent);
  background: var(--accent-pale);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.app .logo-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.app .logo-field span,
.app .logo-field img {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 50%;
}

.app .logo-field span {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-size: 21px;
}

.app .logo-field img {
  background: white;
  object-fit: contain;
}

.app .logo-field b {
  min-width: 0;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app .logo-field.has-logo {
  border-style: solid;
}

.app .checkout-fields.is-returning {
  grid-template-columns: minmax(0, 1fr) 210px;
}

.app .checkout-fields.is-returning > .url-field,
.app .checkout-fields.is-returning > .logo-field,
.app .checkout-fields.is-returning > .select-field {
  display: none;
}

.app .selected-brand {
  min-width: 0;
  height: 47px;
  padding: 5px 8px 5px 6px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 999px;
  background: var(--accent-pale);
  text-align: left;
}

.app .selected-brand > img,
.app .selected-brand > span {
  width: 35px;
  height: 35px;
  border-radius: 50%;
}

.app .selected-brand > img {
  background: white;
  object-fit: contain;
}

.app .selected-brand > span {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 760;
}

.app .selected-brand div {
  min-width: 0;
}

.app .selected-brand strong,
.app .selected-brand small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app .selected-brand strong {
  font-size: 12px;
}

.app .selected-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.app .selected-brand button {
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 720;
  cursor: pointer;
}

.app .card-main {
  grid-template-columns: 56px 46px minmax(0, 1fr);
}

.app .rank-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 13px;
  background: white;
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 760;
  object-fit: contain;
}

.app .rank-logo.fallback {
  background: var(--accent-pale);
}

.app .brand-url {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app .claim-button {
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  opacity: 1;
}

.app .claim-button:hover {
  border-color: var(--accent);
  background: var(--accent-pale);
}

.app .category-strip {
  position: relative;
  margin-bottom: 8px;
  padding-top: 7px;
  padding-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app .category-strip::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.app .category-strip button {
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface) 56%, transparent);
  color: var(--muted);
  transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.app .category-strip button:hover {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.app .category-strip button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 5px 12px color-mix(in srgb, var(--accent) 20%, transparent);
}

.app .demo-note {
  display: none;
}

.app .ranking.is-prelaunch-empty > :not(.prelaunch-empty) {
  display: none;
}

.app .prelaunch-empty {
  min-height: 280px;
  padding: 32px 18px;
  display: grid;
  place-content: center;
  gap: 11px;
  border: 1px dashed color-mix(in srgb, var(--accent) 52%, var(--line));
  border-radius: 24px;
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent-pale) 78%, transparent), transparent 58%);
  text-align: center;
}

.app .prelaunch-empty small {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.app .prelaunch-empty b {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  line-height: .98;
  letter-spacing: -.05em;
}

.app .prelaunch-empty span {
  color: var(--accent);
  font-size: 15px;
  font-weight: 720;
}

.category-scroll-indicator {
  position: fixed;
  z-index: 45;
  height: 3px;
  border-radius: 999px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity .15s ease;
}

.category-scroll-indicator::before {
  position: absolute;
  inset: 1px 0 0;
  border-radius: inherit;
  background: rgba(0, 169, 192, .12);
  content: "";
}

.category-scroll-indicator > span {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a9c0 0%, #17bfd0 72%, #f4c430 100%);
  box-shadow: 0 0 8px rgba(0, 169, 192, .28);
  will-change: width, transform;
}

.category-scroll-indicator.is-visible {
  opacity: 1;
}

@media (max-width: 760px) {
  .app .topbar nav {
    position: static;
    left: auto;
    gap: 1px;
    padding: 3px;
    transform: none;
  }

  .app .topbar nav a {
    padding: 7px 9px;
  }

  .app .amount-picker span {
    margin-right: 0;
    font-size: 21px;
  }

  .app .amount-picker.first-place-target > span {
    font-size: 24px;
  }

  .app .amount-picker.first-place-target > strong {
    font-size: 68px;
  }

  .app .payment-amount-row {
    margin-bottom: 14px;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .app .payment-amount-row::after {
    display: none;
  }

  .app .payment-amount-row > span {
    justify-self: center;
    font-size: 11px;
  }

  .app .manual-amount-picker {
    gap: 7px;
  }

  .app .manual-amount-picker > button {
    width: 32px;
    height: 32px;
  }

  .app .manual-amount-input input {
    width: min(22vw, 78px);
    font-size: 25px;
  }

  .app .manual-amount-input b {
    font-size: 22px;
  }

  .app .amount-picker strong {
    font-size: 28px;
  }

  .app .amount-picker button {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    font-size: 18px;
  }

  .app .checkout-fields,
  .app .checkout-fields.is-returning {
    grid-template-columns: 1fr;
  }

  .app .brand-link-field {
    grid-column: auto;
  }

  .app .logo-field,
  .app .selected-brand {
    height: 45px;
  }

  .app .card-main {
    min-height: 132px;
    grid-template-columns: 42px 40px minmax(0, 1fr);
    gap: 7px;
    padding: 13px 12px 43px;
  }

  .app .rank-logo {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 14px;
  }

  .app .brand-url {
    max-width: 210px;
    font-size: 11px;
  }

  .app .claim-button {
    right: 12px;
    bottom: 10px;
    display: block;
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app .topbar nav a,
  .app .theme-button,
  .app .category-strip button,
  .category-scroll-indicator {
    transition: none;
  }
}
