#demo-keys {
  width: 100%;
}

#demo-keys .d-keys {
  width: 100%;
}

#demo-keys .d-keys-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 48px;
  align-items: start;
}

#demo-keys .d-keys-left {
  min-width: 0;
}

#demo-keys .d-keys-combo {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 10px;
}

#demo-keys .d-keys-large-keycap {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  padding: 0;
  border-radius: 10px;
  font-size: 22px;
}

#demo-keys .d-keys-combo-plus {
  color: var(--ink-3);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

#demo-keys .d-keys-slot {
  display: inline-flex;
  width: 64px;
  height: 64px;
  min-width: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

#demo-keys .d-keys-slot.is-empty {
  border: 1px dashed var(--line);
}

#demo-keys .d-keys-letter-entering {
  animation: d-keys-letter-in var(--t-fast) var(--ease-out) both;
}

@keyframes d-keys-letter-in {
  from { transform: scale(.9); }
  to { transform: scale(1); }
}

#demo-keys .d-keys-result {
  display: flex;
  height: 120px;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 24px;
}

#demo-keys .d-keys-toast-slot {
  width: min(380px, 100%);
  max-width: 100%;
  min-height: 56px;
}

#demo-keys .d-keys-hint {
  padding-top: 6px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.45;
}

#demo-keys .d-keys-toast {
  max-width: min(380px, 100%);
  scale: var(--toast-demo-scale);
  transform-origin: left center;
}

#demo-keys .d-keys-toast-entering {
  animation: d-keys-toast-in var(--t-toast) var(--ease-out) both;
}

#demo-keys .d-keys-toast-title-detail {
  white-space: nowrap;
}

#demo-keys .d-keys-toast.is-leaving {
  opacity: 0;
  transition: opacity 150ms var(--ease-in);
}

@keyframes d-keys-toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#demo-keys .d-keys-sentence {
  max-width: 100%;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.4;
}

#demo-keys .d-keys-sentence[hidden] {
  display: none;
}

#demo-keys .d-keys-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#demo-keys .d-keys-row {
  display: grid;
  width: 100%;
  height: 56px;
  grid-template-columns: 36px minmax(0, .95fr) minmax(0, 1.45fr);
  align-items: center;
  column-gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}

#demo-keys .d-keys-row:hover {
  background: var(--fill-soft);
}

#demo-keys .d-keys-row.is-active,
#demo-keys .d-keys-row.is-active:hover {
  background: var(--accent-soft);
}

#demo-keys .d-keys-row-key {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 15px;
}

#demo-keys .d-keys-row-name {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

#demo-keys .d-keys-row-description {
  min-width: 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}

#demo-keys .d-keys-note {
  margin-top: 32px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

#demo-keys .d-keys-inline-keycap {
  min-width: 20px;
  min-height: 20px;
  margin-inline: 1px;
  padding: 0 4px;
  border-radius: var(--radius-keycap-small);
  font-size: 11px;
  vertical-align: .5px;
}

#demo-keys .d-keys-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 899px) {
  #demo-keys .d-keys-layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
  }
}

@media (max-width: 899px) {
  #demo-keys .d-keys-list {
    row-gap: 4px;
  }

  #demo-keys .d-keys-row {
    height: 80px;
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: 18px 34px;
    column-gap: 12px;
    row-gap: 2px;
    align-content: start;
    align-items: start;
    padding: 12px;
  }

  #demo-keys .d-keys-row-key {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
  }

  #demo-keys .d-keys-row-name {
    grid-column: 2;
    grid-row: 1;
  }

  #demo-keys .d-keys-row-description {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  #demo-keys .d-keys-row {
    transition: none;
  }

  #demo-keys .d-keys-letter-entering {
    animation: none;
  }

  #demo-keys .d-keys-toast-entering {
    animation: d-keys-toast-fade var(--t-toast) var(--ease-out) both !important;
  }

  #demo-keys .d-keys-toast.is-leaving {
    transition: opacity 150ms var(--ease-in) !important;
  }
}

@keyframes d-keys-toast-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
