.model-picker[open] .model-card[data-access="locked"] {
  border-color: rgba(123, 139, 136, 0.34);
  filter: saturate(0.46) brightness(0.72);
  opacity: 0.68;
}

.model-picker[open] .model-card[data-access="locked"]:hover,
.model-picker[open] .model-card[data-access="locked"]:focus-visible,
.model-picker[open] .model-card[data-access="locked"].is-previewing {
  border-color: rgba(95, 206, 197, 0.62);
  filter: saturate(0.72) brightness(0.9);
  opacity: 0.9;
}

.model-card-loadout .is-access-locked {
  margin-left: auto;
  border-color: rgba(211, 173, 77, 0.62) !important;
  background: rgba(50, 40, 18, 0.86) !important;
  color: #d9bd69 !important;
  letter-spacing: 0.06em;
}

.picker-confirm[data-access="locked"],
.picker-confirm[data-access="locked"]:hover,
.picker-confirm[data-access="locked"]:focus-visible {
  cursor: pointer;
  border-color: rgba(210, 69, 79, 0.88);
  background:
    linear-gradient(90deg, rgba(9, 10, 10, 0.98), rgba(82, 8, 20, 0.98) 16%, #9f1c33 50%, rgba(69, 6, 18, 0.98) 84%, rgba(7, 10, 10, 0.98)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px);
  color: #f5e8df;
  box-shadow:
    inset 0 0 1.5rem rgba(255, 87, 101, 0.2),
    0 0 1.15rem rgba(184, 35, 53, 0.28);
  filter: none;
  transform: none;
}

.picker-confirm[data-access="locked"]:hover,
.picker-confirm[data-access="locked"]:focus-visible {
  background:
    linear-gradient(90deg, #09100f, #a51532 15%, #d43c50 50%, #8f112b 85%, #09100f),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 7px);
  color: #fff;
  box-shadow:
    inset 0 0 1.8rem rgba(255, 143, 145, 0.24),
    0 0 1.7rem rgba(221, 49, 69, 0.46);
}

.picker-confirm[data-access="locked"]::before,
.picker-confirm[data-access="locked"]::after {
  opacity: 0.68;
}

.model-picker[open] .model-card[data-access="locked"].is-unlock-target {
  border-color: rgba(220, 69, 80, 0.94);
  filter: saturate(0.88) brightness(0.96);
  opacity: 1;
  box-shadow:
    0 0 0 2px rgba(218, 70, 79, 0.72),
    0 0 0 0.24rem rgba(3, 8, 7, 0.96),
    0 0.75rem 1.5rem rgba(0, 0, 0, 0.76),
    0 0 1.25rem rgba(211, 52, 65, 0.22);
}

.api-auth-mode[data-mode="managed"] {
  border-color: rgba(92, 196, 190, 0.68);
  color: #89d8d2;
}

.api-auth-mode[data-mode="browser"] {
  border-color: rgba(206, 177, 83, 0.72);
  color: #dfc66c;
}

@media (min-width: 781px) {
  .header-model.model-launcher {
    grid-template-columns: minmax(0, 1fr) clamp(14.5rem, 34%, 17rem);
    padding-right: 1.25rem;
  }

  .header-model.model-launcher .model-launcher-kicker,
  .header-model.model-launcher > strong,
  .header-model.model-launcher .model-launcher-meta {
    grid-column: 1;
  }

  .header-model.model-launcher .model-launcher-meta {
    grid-row: 3;
    justify-self: start;
    min-width: 9rem;
  }

  .header-model.model-launcher .descent-link,
  .header-model.model-launcher .model-launcher-rank,
  .header-model.model-launcher .model-launcher-arrow {
    display: none;
  }

  .header-model.model-launcher .model-launcher-action {
    position: relative;
    isolation: isolate;
    grid-column: 2;
    grid-row: 1 / 4;
    width: 100%;
    height: 4.35rem;
    align-self: center;
    display: grid;
    grid-template: 0.82rem 1.8rem 0.72rem / minmax(0, 1fr) 1.1rem;
    place-content: center;
    padding: 0.44rem 1.05rem 0.42rem 1.4rem;
    overflow: hidden;
    border: 0;
    clip-path: polygon(8% 0, 45% 0, 50% 6%, 55% 0, 94% 0, 100% 50%, 94% 100%, 55% 100%, 50% 94%, 45% 100%, 8% 100%, 0 50%);
    background:
      linear-gradient(90deg, rgba(31, 5, 10, 0.98), #8f172d 20%, #b82840 51%, #791126 82%, rgba(20, 5, 9, 0.98)),
      repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
    color: #f8eee6;
    box-shadow:
      inset 0 0 1.4rem rgba(255, 100, 110, 0.2),
      0 0 1.25rem rgba(204, 39, 58, 0.3);
    text-align: center;
  }

  .header-model.model-launcher .model-launcher-action::before,
  .header-model.model-launcher .model-launcher-action::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: 1.4rem;
    left: 1.4rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 197, 181, 0.74), transparent);
  }

  .header-model.model-launcher .model-launcher-action::before { top: 0.36rem; }
  .header-model.model-launcher .model-launcher-action::after { bottom: 0.36rem; }

  .header-model.model-launcher .model-launcher-action small,
  .header-model.model-launcher .model-launcher-action b,
  .header-model.model-launcher .model-launcher-action em {
    grid-column: 1;
    min-width: 0;
    margin: 0;
    color: inherit;
    font-style: normal;
    text-align: center;
    white-space: nowrap;
  }

  .header-model.model-launcher .model-launcher-action small {
    grid-row: 1;
    align-self: end;
    color: #f0c9b7;
    font: 800 0.46rem/1 "Cascadia Code", Consolas, monospace;
    letter-spacing: 0.08em;
  }

  .header-model.model-launcher .model-launcher-action b {
    grid-row: 2;
    align-self: center;
    overflow: visible;
    font: 600 1.28rem/1 "Yu Mincho", "Hiragino Mincho ProN", serif;
    letter-spacing: 0.08em;
    text-shadow: 0 0 0.8rem rgba(255, 225, 210, 0.46);
  }

  .header-model.model-launcher .model-launcher-action em {
    grid-row: 3;
    align-self: start;
    color: #f2cbb9;
    font: 700 0.42rem/1 "Cascadia Code", Consolas, monospace;
    letter-spacing: 0.05em;
  }

  .header-model.model-launcher .model-launcher-action svg {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    width: 1rem;
    height: 1rem;
    color: #f1d77e;
    filter: drop-shadow(0 0 0.38rem rgba(255, 221, 113, 0.55));
  }

  .header-model.model-launcher:hover .model-launcher-action,
  .header-model.model-launcher:focus-visible .model-launcher-action {
    background:
      linear-gradient(90deg, rgba(25, 7, 10, 0.99), #a91c35 18%, #d33b51 51%, #94172f 84%, rgba(18, 7, 9, 0.99)),
      repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 5px);
    box-shadow:
      inset 0 0 1.7rem rgba(255, 151, 151, 0.25),
      0 0 1.65rem rgba(226, 57, 76, 0.46);
  }
}

.api-key-unlock-prompt {
  position: relative;
  display: grid;
  gap: 0.36rem;
  margin: 0 0 1rem;
  padding: 0.82rem 0.9rem 0.9rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(201, 55, 69, 0.74);
  border-left: 0.28rem solid #d84955;
  background:
    linear-gradient(110deg, rgba(78, 8, 19, 0.84), rgba(15, 9, 13, 0.96) 66%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  box-shadow:
    inset 0 0 1.6rem rgba(197, 37, 56, 0.14),
    0 0 1rem rgba(153, 30, 45, 0.18);
}

.api-key-unlock-prompt[hidden] {
  display: none;
}

.api-key-unlock-prompt > span {
  color: #dd7380;
  font: 800 0.5rem/1 "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.08em;
}

.api-key-unlock-prompt > strong {
  overflow: hidden;
  color: #f6ece4;
  font: 700 0.84rem/1.25 "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-key-unlock-prompt > small {
  color: rgba(231, 211, 199, 0.74);
  font: 600 0.62rem/1.5 "Yu Gothic UI", Meiryo, sans-serif;
}

.api-key-unlock-prompt button {
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.3rem;
  padding: 0.42rem 0.58rem 0.42rem 0.72rem;
  border: 1px solid rgba(227, 195, 97, 0.66);
  background: linear-gradient(90deg, rgba(84, 68, 20, 0.88), rgba(20, 43, 40, 0.96));
  color: #f5e7a9;
  font: 800 0.65rem/1 "Yu Gothic UI", Meiryo, sans-serif;
}

.api-key-unlock-prompt button[hidden] {
  display: none;
}

.api-key-unlock-prompt button:hover,
.api-key-unlock-prompt button:focus-visible {
  border-color: #f0d874;
  background: linear-gradient(90deg, rgba(128, 99, 22, 0.94), rgba(32, 76, 70, 0.98));
  color: #fff7ce;
}

.api-key-unlock-prompt button svg {
  width: 0.9rem;
  height: 0.9rem;
}

.api-key-unlock-prompt:not([hidden]) ~ #browser-key-controls {
  margin: 0.55rem 0 0.85rem;
  padding: 0.75rem;
  border: 1px solid rgba(219, 185, 83, 0.54);
  background: rgba(35, 29, 10, 0.38);
  box-shadow: 0 0 1rem rgba(211, 175, 65, 0.1);
}

.api-key-unlock-prompt:not([hidden]) ~ #browser-key-controls #api-key {
  border-color: rgba(239, 212, 111, 0.88);
  box-shadow:
    inset 0 0 0.9rem rgba(224, 188, 74, 0.08),
    0 0 0.8rem rgba(223, 183, 68, 0.18);
}

.api-key-unlock-prompt[data-state="ready"] {
  border-color: rgba(88, 211, 197, 0.78);
  border-left-color: #6fddd2;
  background:
    linear-gradient(110deg, rgba(10, 66, 60, 0.78), rgba(12, 17, 18, 0.96) 66%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
}
