@layer empty {
  .empty-stage {
    display: block;
    min-width: 0;
    padding: clamp(18px, 4vw, 36px);
  }

  .empty-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
  }

  .empty-demo {
    position: relative;
    min-width: 0;
    min-height: 310px;
    padding: 34px 12px 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    background: var(--background);
  }

  .empty-demo--wide { grid-column: 1 / -1; }

  .empty-demo__label {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 13px;
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .055em;
    text-transform: uppercase;
  }

  .empty-component {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 264px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    border: 1px dashed transparent;
    border-radius: calc(var(--radius) + 4px);
    text-align: center;
    text-wrap: balance;
  }

  .empty-component--outline { border-color: var(--border); }
  .empty-component--muted { background: color-mix(in srgb, var(--muted) 30%, transparent); }
  .empty-component--compact { min-height: 220px; }

  .empty-header {
    display: flex;
    width: 100%;
    max-width: 384px;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .empty-media {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    margin-block-end: 8px;
  }

  .empty-media--icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--muted);
    color: var(--foreground);
  }

  .empty-media--icon svg { width: 16px; height: 16px; }
  .empty-media--plain { background: transparent; }

  .empty-title {
    color: var(--foreground);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -.01em;
  }

  .empty-description {
    color: var(--muted-foreground);
    font-size: 14px;
    line-height: 1.625;
  }

  .empty-description a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 150ms ease;
  }

  .empty-description a:hover { color: var(--primary); }

  .empty-content {
    display: flex;
    width: 100%;
    max-width: 384px;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--foreground);
    font-size: 14px;
    text-wrap: balance;
  }

  .empty-content--row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .empty-button,
  .empty-link-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
  }

  .empty-button {
    height: 32px;
    gap: 6px;
    padding-inline: 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
  }

  .empty-button svg { width: 16px; height: 16px; pointer-events: none; }

  .empty-button--small {
    height: 28px;
    gap: 4px;
    padding-inline: 10px;
    font-size: 12.8px;
  }

  .empty-button--small svg { width: 14px; height: 14px; }

  .empty-button--primary {
    background: var(--primary);
    color: var(--primary-foreground);
  }

  .empty-button--primary:hover { background: color-mix(in srgb, var(--primary) 80%, transparent); }

  .empty-button--outline {
    border-color: var(--border);
    background: var(--background);
    color: var(--foreground);
  }

  .empty-button--outline:hover { background: var(--muted); }

  .empty-button:active,
  .empty-link-button:active { transform: translateY(1px); }

  .empty-button:focus-visible,
  .empty-link-button:focus-visible {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
  }

  .empty-button:disabled {
    pointer-events: none;
    opacity: .5;
  }

  .empty-button[aria-invalid="true"] {
    border-color: var(--destructive);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 20%, transparent);
  }

  .empty-link-button {
    height: 28px;
    gap: 4px;
    padding-inline: 10px;
    border-radius: 8px;
    color: var(--muted-foreground);
    font-size: 12.8px;
    line-height: 20px;
    text-decoration: none;
    text-underline-offset: 4px;
  }

  .empty-link-button:hover { text-decoration: underline; }
  .empty-link-button svg { width: 14px; height: 14px; }
  [dir="rtl"] .empty-link-button__rtl-arrow { transform: rotate(270deg); }

  .empty-avatar {
    position: relative;
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: #fafafa;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: .02em;
    box-shadow: 0 0 0 2px var(--background);
  }

  .empty-avatar--single {
    filter: grayscale(1);
    background: linear-gradient(145deg, #525252 0 47%, #a3a3a3 47% 61%, #737373 61%);
  }

  .empty-avatar--one { background: linear-gradient(145deg, #2563eb 0 45%, #60a5fa 45%); }
  .empty-avatar--two { background: linear-gradient(145deg, #7c3aed 0 45%, #c084fc 45%); }
  .empty-avatar--three { background: linear-gradient(145deg, #047857 0 45%, #34d399 45%); }

  .empty-avatar-group { display: flex; padding-inline: 2px; }
  .empty-avatar-group .empty-avatar + .empty-avatar { margin-inline-start: -8px; }

  .empty-input-group {
    display: flex;
    width: 75%;
    min-width: 0;
    height: 32px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--input);
    border-radius: 8px;
    background: transparent;
    color: var(--muted-foreground);
    transition: border-color 150ms ease, box-shadow 150ms ease;
  }

  .empty-input-group:focus-within {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
  }

  .empty-input-group:has(input:invalid) {
    border-color: var(--destructive);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 20%, transparent);
  }

  .empty-input-group:has(input:disabled) {
    background: color-mix(in srgb, var(--input) 50%, transparent);
    opacity: .5;
  }

  .empty-input-group > svg {
    width: 16px;
    height: 16px;
    flex: none;
    margin-inline-start: 8px;
  }

  .empty-input-group input {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 4px 6px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--foreground);
    font-size: 14px;
    line-height: 20px;
  }

  .empty-input-group input::-webkit-search-cancel-button { display: none; }
  .empty-input-group input::placeholder { color: var(--muted-foreground); opacity: 1; }

  .empty-input-group kbd {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    flex: none;
    align-items: center;
    justify-content: center;
    margin-inline-end: 6px;
    padding-inline: 4px;
    border-radius: 4px;
    background: var(--muted);
    color: var(--muted-foreground);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
  }

  @media (prefers-color-scheme: dark) {
    .empty-button--outline { border-color: var(--input); background: color-mix(in srgb, var(--input) 30%, transparent); }
    .empty-button--outline:hover { background: color-mix(in srgb, var(--input) 50%, transparent); }
  }

  @media (max-width: 700px) {
    .empty-showcase { grid-template-columns: minmax(0, 1fr); }
    .empty-demo--wide { grid-column: auto; }
    .empty-input-group { width: 100%; }
  }

  @media (max-width: 420px) {
    .empty-stage { padding: 12px; }
    .empty-demo { min-height: 0; padding-inline: 8px; }
    .empty-component { min-height: 260px; padding: 20px 12px; }
    .empty-component--compact { min-height: 220px; }
  }
}
