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

.kbd-hint {
  font-size: 12px;
  color: var(--muted);
}

.toast-suggestion {
  position: fixed;
  right: 16px;
  bottom: 14px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(111, 231, 255, 0.48);
  background: rgba(7, 8, 18, 0.95);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 2500;
}

.toast-stack {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 3300;
  width: min(360px, calc(100vw - 20px));
  display: grid;
  gap: 8px;
}

.toast-item {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  background: rgba(7, 8, 18, 0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: toast-enter 180ms ease-out;
}

.toast-item__inner {
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.toast-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.toast-item__title {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.toast-item__msg {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.toast-item__close {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(9, 8, 20, 0.86);
  color: var(--muted);
  cursor: pointer;
  width: 22px;
  height: 22px;
  line-height: 1;
}

.toast-item__progress {
  height: 3px;
  background: rgba(145, 160, 178, 0.22);
}

.toast-item__progress > span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  animation: toast-progress 5s linear forwards;
}

.toast-item--info {
  border-left-color: var(--accent-cyan);
}

.toast-item--info .toast-item__progress > span {
  background: var(--accent-cyan);
}

.toast-item--success {
  border-left-color: #4ed88d;
}

.toast-item--success .toast-item__progress > span {
  background: #4ed88d;
}

.toast-item--warning {
  border-left-color: var(--color-warning);
}

.toast-item--warning .toast-item__progress > span {
  background: var(--color-warning);
}

.toast-item--error {
  border-left-color: var(--color-danger);
}

.toast-item--error .toast-item__progress > span {
  background: var(--color-danger);
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 639px) {
  .toast-stack {
    left: 50%;
    right: auto;
    bottom: 86px;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 20px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast-item,
  .toast-item__progress > span {
    animation: none;
  }
}

.command-palette {
  position: fixed;
  inset: 0;
  display: none;
  place-items: start center;
  padding-top: 16vh;
  background: rgba(4, 2, 8, 0.55);
  z-index: 2600;
}

.command-palette.is-open {
  display: grid;
}

.command-dialog {
  width: min(760px, 92vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 8, 10, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  padding: 12px;
}

.command-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding-right: 2px;
}

.command-section-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 2px 2px;
  border-top: 1px solid rgba(145, 160, 178, 0.15);
  margin-top: 4px;
}

.command-item {
  border: 1px solid var(--line);
  background: rgba(14, 19, 26, 0.8);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 8px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.command-item-label {
  font-size: 13px;
}

.command-item-shortcut {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid rgba(145, 160, 178, 0.24);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  white-space: nowrap;
}

.command-empty {
  border: 1px dashed rgba(145, 160, 178, 0.28);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

