.key-main {
  justify-content: center;
  padding: 40px 18px;
}

.key-card {
  width: min(100%, 560px);
  padding: clamp(24px, 6vw, 42px);
  border: 1px solid var(--line, #26262c);
  border-radius: 12px;
  background: rgba(17, 17, 20, 0.82);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.key-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #929292;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.key-back:hover {
  color: #e8e8e8;
  transform: translateX(-2px);
}

.key-back .duotone-icon {
  width: 17px;
  height: 17px;
}

.key-card h1 {
  margin-top: 30px;
  font-size: clamp(2rem, 8vw, 3.25rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.key-card > p {
  color: #aaa;
  line-height: 1.6;
}

.key-card button,
.key-button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 17px;
  border: 0;
  border-radius: 7px;
  background: #1b1b20;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.78);
  color: #e2e2e8;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 140ms ease, box-shadow 160ms ease;
}

.key-card button:hover:not(:disabled),
.key-button-link:hover {
  background: #26262d;
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.84);
  transform: translateY(-1px);
}

.key-card button:active:not(:disabled),
.key-button-link:active {
  transform: translateY(1px) scale(0.97);
}

.key-card button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.key-card .button-secondary {
  background: #111114;
  color: #ddd;
}

.key-card .button-secondary:hover:not(:disabled) {
  background: #1b1b20;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.key-card button:focus-visible,
.key-button-link:focus-visible,
.key-back:focus-visible,
.key-card a:focus-visible {
  outline: 2px solid #c9c9d2;
  outline-offset: 4px;
}

.key-card button .duotone-icon,
.key-button-link .duotone-icon {
  width: 18px;
  height: 18px;
}

.key-card .button-secondary .duotone-icon {
  stroke: #d4d4dc;
}

.key-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.key-form label {
  display: grid;
  gap: 7px;
  color: #c9c9c9;
  font-size: 0.95rem;
}

.key-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #33333a;
  border-radius: 6px;
  outline: none;
  background: #0f0f0f;
  color: #e8e8e8;
  font: inherit;
}

.key-form input:focus {
  border-color: #777780;
  box-shadow: 0 0 0 3px rgba(170, 170, 185, 0.1);
}

.key-form button {
  justify-self: start;
}

.form-switch,
.dashboard-muted {
  color: #929292 !important;
  font-size: 0.9rem;
}

.key-card a:not(.key-back, .key-button-link) {
  color: #e8e8e8;
}

.dashboard-summary,
.dashboard-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #292929;
}

.dashboard-section {
  text-align: left;
}

.dashboard-summary > p:first-child {
  margin: 0 0 16px;
  color: #bbb;
}

.dashboard-section h2 {
  margin: 0;
  color: #e8e8e8;
  font-size: 1.15rem;
}

.dashboard-section form {
  margin: 12px 0 24px;
}

.license-value + button {
  margin-right: 8px;
}

.license-value {
  padding: 14px;
  overflow-wrap: anywhere;
  border: 1px solid #33333a;
  border-radius: 6px;
  background: #0f0f0f;
  color: #fff !important;
  font-family: Consolas, monospace;
  user-select: all;
}

.copy-status {
  min-height: 1.5em;
}

.dashboard-card {
  width: min(100%, 620px);
  padding: clamp(28px, 6vw, 48px);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.dashboard-card .key-back {
  display: none;
}

.dashboard-card h1 {
  margin: 0;
  font-size: clamp(3.25rem, 11vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-card > p {
  margin: 14px 0 0;
  color: #85858f;
  font-size: 0.94rem;
}

.dashboard-layout {
  margin: 30px auto 0;
  text-align: left;
}

.dashboard-lede {
  display: none;
}

.dashboard-details {
  display: grid;
  gap: 6px;
}

.dashboard-detail {
  display: grid;
  grid-template-columns: 22px minmax(85px, 1fr) minmax(0, auto);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 7px;
  background: rgba(20, 20, 24, 0.76);
  color: #b9b9c2;
  font-size: 0.9rem;
}

.dashboard-detail .duotone-icon {
  width: 17px;
  height: 17px;
}

.dashboard-detail strong {
  overflow: hidden;
  color: #d5d5dc;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
}

.dashboard-hint {
  margin: 17px 2px 14px;
  color: #777780;
  font-size: 0.83rem;
  line-height: 1.5;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.dashboard-actions form {
  margin: 0;
}

.redeem-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.redeem-form input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 41px;
  padding: 10px 12px;
  border: 1px solid #33333a;
  border-radius: 7px;
  outline: none;
  background: #111114;
  color: #e8e8ed;
  font: inherit;
  font-size: 0.88rem;
}

.redeem-form input:focus {
  border-color: #777780;
  box-shadow: 0 0 0 3px rgba(170, 170, 185, 0.1);
}

.redeem-form button {
  flex: 0 0 auto;
  min-height: 41px;
  padding: 9px 13px;
  font-size: 0.88rem;
  font-weight: 500;
}

.dashboard-actions .key-button-link,
.dashboard-actions button {
  min-height: 41px;
  padding: 9px 13px;
  font-size: 0.88rem;
  font-weight: 500;
}

.dashboard-notice {
  margin: 14px 0 0 !important;
  color: #b8b8c2 !important;
  font-size: 0.85rem !important;
}

@media (max-width: 600px) {
  .key-main {
    align-items: flex-start;
  }

  .key-card h1 {
    font-size: 2.5rem;
  }

  .dashboard-card h1 {
    font-size: clamp(3rem, 16vw, 4.2rem);
  }

  .dashboard-detail {
    grid-template-columns: 20px minmax(60px, 1fr) minmax(0, 1.4fr);
    gap: 8px;
    padding: 8px 10px;
  }

  .dashboard-detail strong {
    font-size: 0.8rem;
  }

  .dashboard-actions {
    gap: 8px;
  }

  .dashboard-actions .key-button-link,
  .dashboard-actions button {
    padding-inline: 11px;
  }

  .redeem-form {
    align-items: stretch;
    flex-direction: column;
  }

  .redeem-form input,
  .redeem-form button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .key-card button,
  .key-button-link,
  .key-back {
    transition-duration: 0.01ms;
  }
}
