/*
 * new-york — ported from upstream shadcn's `new-york-v4` style (MIT —
 * https://github.com/shadcn-ui/ui — apps/v4/registry/new-york-v4/ui/*.tsx),
 * NOT from apps/v4/registry/styles/style-*.css (new-york-v4 has no cn-*
 * token-layer CSS; its classes are inline per component). Each ported rule
 * below is derived as: new-york-v4's inline classes for that part, MINUS the
 * structural classes our component (packages/shadcn/ui/<name>/classes.ts,
 * itself ported from apps/v4/registry/bases/base/ui/*.tsx) already applies.
 * See scratch/team-lead/briefs/style-new-york-playbook.md for the method and
 * tooling/derive-new-york.ts for the extraction/diff tool.
 *
 * PILOT SCOPE (2026-09-27): only button, card, input, badge, dropdown-menu
 * (+ its dropdown-menu-sub-* parts) are ported from new-york-v4 below, each
 * marked "new-york: ported from new-york-v4" in its own comment. Every other
 * rule in this file is UNCHANGED from style-vega.css (marked "new-york: no
 * upstream new-york-v4 source; vega rules" at each MARK section) — vega is
 * the closest style for the 25 Zag-only components with no new-york-v4
 * counterpart, and is a deliberate placeholder for the 57 components not yet
 * ported by the pilot. Do not treat an unmarked block as verified parity.
 *
 * NOTE: no CSS comment below may contain a literal asterisk-slash sequence
 * inside its text (e.g. quoting another comment's closer) — it terminates
 * the comment early and corrupts everything after it into the next
 * selector, exactly like the ASCII-arrow HTML-comment trap documented in
 * this repo's CLAUDE.md. Quote comment markers without their closing slash,
 * as done here.
 */

.style-new-york {
  /* new-york: no upstream new-york-v4 source; vega rules (pilot scope: not yet ported) */
  /* MARK: Accordion */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/accordion.tsx) */
  .mu-accordion-item {
    @apply not-last:border-b;
  }

  .mu-accordion-trigger {
    @apply focus-visible:ring-ring/50 focus-visible:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground gap-4 rounded-md py-4 text-left text-sm font-medium hover:underline focus-visible:ring-3 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4;
  }

  .mu-accordion-content {
    @apply overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up;
  }

  .mu-accordion-content-inner {
    @apply pt-0 pb-4;
  }

  /* MARK: Alert Dialog */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/alert-dialog.tsx) */
  .mu-alert-dialog-overlay {
    @apply data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/50;
  }

  .mu-alert-dialog-content {
    @apply data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background max-w-[calc(100%-2rem)] gap-4 rounded-lg border p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg;
  }

  .mu-alert-dialog-header {
    @apply grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr];
  }

  .mu-alert-dialog-media {
    @apply bg-muted mb-2 inline-flex size-16 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8;
  }

  .mu-alert-dialog-title {
    @apply text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2;
  }

  .mu-alert-dialog-description {
    @apply text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3;
  }

  /* MARK: Alert */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/alert.tsx) */
  .mu-alert {
    @apply grid grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4;
  }

  .mu-alert-variant-default {
    @apply bg-card text-card-foreground;
  }

  .mu-alert-variant-destructive {
    @apply text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current;
  }

  .mu-alert-title {
    @apply col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight;
  }

  .mu-alert-description {
    @apply col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed;
  }

  .mu-alert-action {
    @apply absolute top-2.5 right-3;
  }

  /* MARK: Avatar */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/avatar.tsx) */
  .mu-avatar {
    @apply size-8 overflow-hidden rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6;
  }

  .mu-avatar-fallback {
    @apply bg-muted text-muted-foreground rounded-full text-sm;
  }

  .mu-avatar-image {
    @apply rounded-full;
  }

  .mu-avatar-badge {
    @apply bg-primary text-primary-foreground ring-2 ring-background group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2 group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2;
  }

  .mu-avatar-group-count {
    @apply bg-muted text-muted-foreground size-8 rounded-full text-sm group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3;
  }

  /* MARK: Badge */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/badge.tsx) */
  .mu-badge {
    @apply gap-1 rounded-full border border-transparent px-2 py-0.5 text-xs font-medium transition-[color,box-shadow] [&>svg]:size-3;
  }

  .mu-badge-variant-default {
    @apply bg-primary text-primary-foreground [a&]:hover:bg-primary/90;
  }

  .mu-badge-variant-secondary {
    @apply bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90;
  }

  .mu-badge-variant-outline {
    @apply border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground;
  }

  .mu-badge-variant-destructive {
    @apply bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90;
  }

  .mu-badge-variant-ghost {
    @apply [a&]:hover:bg-accent [a&]:hover:text-accent-foreground;
  }

  .mu-badge-variant-link {
    @apply text-primary underline-offset-4 [a&]:hover:underline;
  }

  /* MARK: Breadcrumb */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/breadcrumb.tsx) */
  .mu-breadcrumb-list {
    @apply text-muted-foreground gap-1.5 text-sm sm:gap-2.5;
  }

  .mu-breadcrumb-item {
    @apply gap-1.5;
  }

  .mu-breadcrumb-link {
    @apply hover:text-foreground transition-colors;
  }

  .mu-breadcrumb-page {
    @apply text-foreground font-normal;
  }

  .mu-breadcrumb-separator {
    @apply [&>svg]:size-3.5;
  }

  .mu-breadcrumb-ellipsis {
    @apply size-9;
  }

  /* MARK: Button */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/button.tsx) */
  .mu-button {
    @apply gap-2 rounded-md text-sm font-medium focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-button-variant-default {
    @apply bg-primary text-primary-foreground hover:bg-primary/90;
  }

  .mu-button-variant-outline {
    @apply border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50;
  }

  .mu-button-variant-secondary {
    @apply bg-secondary text-secondary-foreground hover:bg-secondary/80;
  }

  .mu-button-variant-ghost {
    @apply hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50;
  }

  .mu-button-variant-destructive {
    @apply bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40;
  }

  .mu-button-variant-link {
    @apply text-primary underline-offset-4 hover:underline;
  }

  .mu-button-size-xs {
    @apply h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3;
  }

  .mu-button-size-sm {
    @apply h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5;
  }

  .mu-button-size-default {
    @apply h-9 px-4 py-2 has-[>svg]:px-3;
  }

  .mu-button-size-lg {
    @apply h-10 rounded-md px-6 has-[>svg]:px-4;
  }

  .mu-button-size-icon-xs {
    @apply size-6 rounded-md [&_svg:not([class*='size-'])]:size-3;
  }

  .mu-button-size-icon-sm {
    @apply size-8;
  }

  .mu-button-size-icon {
    @apply size-9;
  }

  .mu-button-size-icon-lg {
    @apply size-10;
  }

  /* MARK: Button Group */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/button-group.tsx) */
  .mu-button-group {
    @apply has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md;
  }

  .mu-button-group-orientation-horizontal {
    @apply [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md!;
  }

  .mu-button-group-orientation-vertical {
    @apply [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md!;
  }

  .mu-button-group-text {
    @apply bg-muted gap-2 rounded-md border px-2.5 text-sm font-medium shadow-xs [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-button-group-separator {
    @apply bg-input m-0! data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px;
  }

  /* MARK: Calendar */
  .mu-calendar {
    @apply p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(8)];
  }

  .mu-calendar-dropdown-root {
    @apply has-focus:border-ring border-input has-focus:ring-ring/50 border shadow-xs has-focus:ring-3;
  }

  .mu-calendar-caption-label {
    @apply h-8 pr-1 pl-2;
  }

  /* MARK: Card */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/card.tsx) */
  .mu-card {
    @apply gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm;
  }

  .mu-card-header {
    @apply gap-2 px-6 [.border-b]:pb-6;
  }

  .mu-card-title {
    @apply leading-none font-semibold;
  }

  .mu-card-description {
    @apply text-sm text-muted-foreground;
  }

  .mu-card-content {
    @apply px-6;
  }

  .mu-card-content:has(> [data-slot=questionnaire-choices]) {
    @apply flex flex-col gap-3;
  }

  .mu-card-footer {
    @apply px-6 [.border-t]:pt-6;
  }

  /* MARK: Carousel */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/carousel.tsx) */
  .mu-carousel-previous {
    @apply rounded-full;
  }

  .mu-carousel-next {
    @apply rounded-full;
  }

  /* MARK: Chart */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/chart.tsx) — no change from
     vega; new-york-v4's ChartTooltipContent class string, minus our structural classes.ts tokens,
     already equals vega's rule verbatim. */
  .mu-chart-tooltip {
    @apply border-border/50 bg-background gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl;
  }

  /* MARK: Checkbox */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/checkbox.tsx) */
  .mu-checkbox {
    @apply size-4 rounded-[4px] border border-input shadow-xs transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary group-has-disabled/field:opacity-50;
  }

  .mu-checkbox-aria {
    @apply data-selected:bg-primary data-selected:text-primary-foreground dark:data-selected:bg-primary data-selected:border-primary data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-focus-visible:ring-3 data-invalid:data-selected:border-primary data-invalid:border-destructive dark:data-invalid:border-destructive/50 data-invalid:ring-destructive/20 dark:data-invalid:ring-destructive/40 data-invalid:ring-3;
  }

  .mu-checkbox-indicator {
    @apply [&>svg]:size-3.5;
  }

  /* MARK: Combobox */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/combobox.tsx) */
  .mu-combobox-content {
    @apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 max-h-96 min-w-36 overflow-hidden rounded-md shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none;
  }

  .mu-combobox-content-logical {
    @apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
  }

  .mu-combobox-label {
    @apply text-muted-foreground px-2 py-1.5 text-xs pointer-coarse:px-3 pointer-coarse:py-2 pointer-coarse:text-sm;
  }

  .mu-combobox-item {
    @apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-combobox-item-aria {
    @apply data-focused:bg-accent data-focused:text-accent-foreground not-data-[variant=destructive]:data-focused:**:text-accent-foreground;
  }

  .mu-combobox-item-indicator {
    @apply pointer-events-none absolute right-2 flex size-4 items-center justify-center;
  }

  .mu-combobox-empty {
    @apply text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex;
  }

  .mu-combobox-list {
    @apply no-scrollbar max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0;
  }

  .mu-combobox-item-text {
    @apply flex flex-1 gap-2;
  }

  .mu-combobox-separator {
    @apply bg-border -mx-1 my-1 h-px;
  }

  .mu-combobox-trigger {
    @apply [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-combobox-trigger-icon {
    @apply text-muted-foreground size-4;
  }

  .mu-combobox-chips {
    @apply dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive dark:has-aria-invalid:border-destructive/50 flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1.5;
  }

  .mu-combobox-chip {
    @apply bg-muted text-foreground flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pr-0;
  }

  .mu-combobox-chip-remove {
    @apply -ml-1 opacity-50 hover:opacity-100;
  }

  /* MARK: Command */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/command.tsx) */
  .mu-command {
    @apply bg-popover text-popover-foreground rounded-md;
  }

  .mu-command-dialog {
    @apply overflow-hidden p-0;
  }

  .mu-command-input-wrapper {
    @apply p-1 pb-0;
  }

  .mu-command-input-group {
    @apply bg-input/30 border-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:pl-2!;
  }

  .mu-command-input-icon {
    @apply size-4 shrink-0 opacity-50;
  }

  .mu-command-input {
    @apply w-full text-sm;
  }

  .mu-command-list {
    @apply no-scrollbar max-h-72 scroll-py-1 outline-none;
  }

  .mu-command-empty {
    @apply py-6 text-center text-sm;
  }

  .mu-command-group {
    @apply text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium;
  }

  .mu-command-separator {
    @apply bg-border -mx-1 h-px w-auto;
  }

  .mu-command-item {
    @apply data-selected:bg-muted data-selected:text-foreground data-selected:**:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-command-item-aria {
    @apply data-focused:bg-muted data-focused:text-foreground data-focused:**:[svg]:text-foreground;
  }

  .mu-command-shortcut {
    @apply text-muted-foreground group-data-selected/command-item:text-foreground ml-auto text-xs tracking-widest;
  }

  .mu-command-shortcut-aria {
    @apply group-data-focused/command-item:text-foreground;
  }

  /* MARK: Context Menu */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/context-menu.tsx) */
  .mu-context-menu-content {
    @apply data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground min-w-32 rounded-md border p-1 shadow-md;
  }

  .mu-context-menu-content-logical {
    @apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
  }

  .mu-context-menu-item {
    @apply focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! gap-2 rounded-sm px-2 py-1.5 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground;
  }

  .mu-context-menu-checkbox-item {
    @apply focus:bg-accent focus:text-accent-foreground gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-context-menu-radio-item {
    @apply focus:bg-accent focus:text-accent-foreground gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-context-menu-item-indicator {
    @apply absolute left-2 flex size-3.5 items-center justify-center;
  }

  .mu-context-menu-label {
    @apply text-foreground px-2 py-1.5 text-sm font-medium data-inset:pl-8;
  }

  .mu-context-menu-separator {
    @apply bg-border -mx-1 my-1 h-px;
  }

  .mu-context-menu-shortcut {
    @apply text-muted-foreground ml-auto text-xs tracking-widest;
  }

  .mu-context-menu-sub-trigger {
    @apply focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground rounded-sm px-2 py-1.5 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground;
  }

  .mu-context-menu-sub-content {
    @apply data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground min-w-32 rounded-md border p-1 shadow-lg;
  }

  /* MARK: Dialog */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/dialog.tsx) */
  .mu-dialog-overlay {
    @apply bg-black/50 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0;
  }

  .mu-dialog-content {
    @apply grid max-w-[calc(100%-2rem)] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 sm:max-w-lg;
  }

  .mu-dialog-close {
    @apply absolute top-4 right-4 opacity-70 hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 data-open:bg-accent data-open:text-muted-foreground;
  }

  .mu-dialog-header {
    @apply gap-2 text-center sm:text-left;
  }

  .mu-dialog-footer {
    @apply gap-2;
  }

  .mu-dialog-title {
    @apply text-lg leading-none font-semibold;
  }

  .mu-dialog-description {
    @apply text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3;
  }

  /* MARK: Drawer */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/drawer.tsx) */
  .mu-drawer-overlay {
    @apply bg-black/50;
  }

  .mu-drawer-content {
    @apply bg-background flex h-auto flex-col data-[swipe-direction=up]:inset-x-0 data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:mb-24 data-[swipe-direction=up]:max-h-[80vh] data-[swipe-direction=up]:rounded-b-lg data-[swipe-direction=up]:border-b data-[swipe-direction=down]:inset-x-0 data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:mt-24 data-[swipe-direction=down]:max-h-[80vh] data-[swipe-direction=down]:rounded-t-lg data-[swipe-direction=down]:border-t data-[swipe-direction=right]:inset-y-0 data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:w-3/4 data-[swipe-direction=right]:border-l data-[swipe-direction=right]:sm:max-w-sm data-[swipe-direction=left]:inset-y-0 data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:w-3/4 data-[swipe-direction=left]:border-r data-[swipe-direction=left]:sm:max-w-sm;
  }

  .mu-drawer-popup {
    @apply bg-popover text-popover-foreground text-sm data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b;
  }

  .mu-drawer-handle {
    @apply bg-muted mx-auto mt-4 hidden h-1.5 w-[100px] shrink-0 rounded-full;
  }

  .mu-drawer-swipe-handle {
    @apply after:bg-muted after:block after:shrink-0 after:rounded-full group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-axis=y]/drawer-popup:after:h-1.5 group-data-[swipe-axis=y]/drawer-popup:after:w-[100px] group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=up]/drawer-popup:items-start group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=x]/drawer-popup:after:h-[100px] group-data-[swipe-axis=x]/drawer-popup:after:w-1.5 group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end;
  }

  .mu-drawer-header {
    @apply gap-0.5 p-4 md:gap-1.5 md:text-left;
  }

  .mu-drawer-header-base {
    @apply gap-0.5 p-4 pb-0 md:gap-1.5 md:text-left;
  }

  .mu-drawer-title {
    @apply text-foreground font-semibold;
  }

  .mu-drawer-description {
    @apply text-muted-foreground text-sm;
  }

  .mu-drawer-footer {
    @apply gap-2 p-4;
  }

  .mu-drawer-footer-base {
    @apply gap-2 p-4 pt-0;
  }

  /* MARK: Dropdown Menu */
  /*
   * new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/dropdown-menu.tsx).
   * Radix state/side selectors mapped to our Zag custom variants per globals.css:
   * data-[state=open] -> data-open, data-[state=closed] -> data-closed
   * (data-[side=*] and data-[disabled]/data-[inset] pass through unchanged —
   * our components already emit those as plain data attributes, matching
   * new-york-v4's Radix shape 1:1, so no rewrite was needed there).
   */
  .mu-dropdown-menu-content {
    @apply data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 rounded-md border bg-popover p-1 text-popover-foreground shadow-md;
  }

  .mu-dropdown-menu-content-logical {
    @apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
  }

  .mu-dropdown-menu-item {
    @apply gap-2 rounded-sm px-2 py-1.5 text-sm focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!;
  }

  .mu-dropdown-menu-checkbox-item {
    @apply gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-dropdown-menu-radio-item {
    @apply gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-dropdown-menu-item-indicator {
    @apply absolute left-2 flex size-3.5 items-center justify-center;
  }

  .mu-dropdown-menu-label {
    @apply px-2 py-1.5 text-sm font-medium data-inset:pl-8;
  }

  .mu-dropdown-menu-separator {
    @apply -mx-1 my-1 h-px bg-border;
  }

  .mu-dropdown-menu-shortcut {
    @apply ml-auto text-xs tracking-widest text-muted-foreground;
  }

  .mu-dropdown-menu-sub-trigger {
    @apply gap-2 rounded-sm px-2 py-1.5 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground;
  }

  .mu-dropdown-menu-sub-content {
    @apply data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg;
  }

  /* MARK: Empty */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/empty.tsx) */
  .mu-empty {
    @apply gap-6 rounded-lg border-dashed p-6 md:p-12;
  }

  .mu-empty-header {
    @apply gap-2 text-center;
  }

  .mu-empty-media {
    @apply mb-2;
  }

  .mu-empty-media-default {
    @apply bg-transparent;
  }

  .mu-empty-media-icon {
    @apply bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6;
  }

  .mu-empty-title {
    @apply text-lg font-medium tracking-tight;
  }

  .mu-empty-description {
    @apply text-sm/relaxed;
  }

  .mu-empty-content {
    @apply gap-4 text-sm;
  }

  /* MARK: Field */
  .mu-field-set {
    @apply gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
  }

  .mu-field-legend {
    @apply mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base;
  }

  .mu-field-group {
    @apply gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4;
  }

  .mu-field {
    @apply data-[invalid=true]:text-destructive gap-3;
  }

  .mu-field-content {
    @apply gap-1.5;
  }

  .mu-field-label {
    @apply has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4;
  }

  .mu-field-label-aria {
    @apply has-data-selected:bg-primary/5 has-data-selected:border-primary/30 dark:has-data-selected:border-primary/20 dark:has-data-selected:bg-primary/10;
  }

  .mu-field-title {
    @apply gap-2 leading-snug text-sm font-medium group-data-[disabled=true]/field:opacity-50;
  }

  .mu-field-description {
    @apply text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5;
  }

  .mu-field-separator {
    @apply -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2;
  }

  .mu-field-separator-content {
    @apply text-muted-foreground px-2;
  }

  .mu-field-error {
    @apply text-destructive text-sm;
  }

  /* MARK: Hover Card */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/hover-card.tsx) */
  .mu-hover-card-content {
    @apply data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground border w-64 rounded-md p-4 shadow-md;
  }

  .mu-hover-card-content-logical {
    @apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
  }

  /* MARK: Input */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/input.tsx) */
  .mu-input {
    @apply h-9 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:h-7 file:text-sm file:font-medium md:text-sm dark:bg-input/30 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40;
  }

  /* MARK: Input OTP */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/input-otp.tsx) */
  .mu-input-otp {
    @apply gap-2;
  }

  .mu-input-otp-group {
    @apply has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-md has-aria-invalid:ring-3;
  }

  .mu-input-otp-slot {
    @apply dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive h-9 w-9 border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px];
  }

  .mu-input-otp-caret-line {
    @apply animate-caret-blink bg-foreground h-4 w-px duration-1000;
  }

  .mu-input-otp-separator {
    @apply [&_svg:not([class*='size-'])]:size-4;
  }

  /* MARK: Item */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/item.tsx) */
  .mu-item {
    @apply [a]:hover:bg-accent/50 rounded-md border border-transparent text-sm;
  }

  .mu-item-variant-default {
    @apply bg-transparent;
  }

  .mu-item-variant-outline {
    @apply border-border;
  }

  .mu-item-variant-muted {
    @apply bg-muted/50 border-transparent;
  }

  .mu-item-size-default {
    @apply gap-4 p-4;
  }

  .mu-item-size-sm {
    @apply gap-2.5 px-4 py-3;
  }

  .mu-item-size-xs {
    @apply gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0;
  }

  .mu-item-media {
    @apply gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start;
  }

  .mu-item-media-variant-default {
    @apply bg-transparent;
  }

  .mu-item-media-variant-icon {
    @apply size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-item-media-variant-image {
    @apply size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover;
  }

  .mu-item-content {
    @apply gap-1 group-data-[size=xs]/item:gap-0;
  }

  .mu-item-title {
    @apply gap-2 text-sm leading-snug font-medium underline-offset-4;
  }

  .mu-item-description {
    @apply text-muted-foreground text-left text-sm leading-normal text-balance group-data-[size=xs]/item:text-xs;
  }

  .mu-item-actions {
    @apply gap-2;
  }

  .mu-item-header {
    @apply gap-2;
  }

  .mu-item-footer {
    @apply gap-2;
  }

  .mu-item-group {
    @apply gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2;
  }

  .mu-item-separator {
    @apply my-0;
  }

  /* MARK: Kbd */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/kbd.tsx) */
  .mu-kbd {
    @apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3;
  }

  .mu-kbd-group {
    @apply gap-1;
  }

  /* MARK: Label */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/label.tsx) */
  .mu-label {
    @apply gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
  }

  .mu-label-aria {
    @apply peer-data-disabled:opacity-50;
  }

  /* MARK: Menubar */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/menubar.tsx) */
  .mu-menubar {
    @apply h-9 gap-1 rounded-md border bg-background p-1 shadow-xs;
  }

  .mu-menubar-trigger {
    @apply focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground rounded-sm px-2 py-1 text-sm font-medium;
  }

  .mu-menubar-content {
    @apply bg-popover text-popover-foreground data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-[12rem] rounded-md border p-1 shadow-md;
  }

  .mu-menubar-content-logical {
    @apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
  }

  .mu-menubar-item {
    @apply focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm data-disabled:opacity-50 data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground;
  }

  .mu-menubar-checkbox-item {
    @apply focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm data-disabled:opacity-50 data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-menubar-checkbox-item-indicator {
    @apply left-2 size-3.5 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-menubar-radio-item {
    @apply focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm data-disabled:opacity-50 data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-menubar-radio-item-indicator {
    @apply left-2 size-3.5 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-menubar-label {
    @apply px-2 py-1.5 text-sm font-medium data-inset:pl-8;
  }

  .mu-menubar-separator {
    @apply bg-border;
  }

  .mu-menubar-shortcut {
    @apply text-muted-foreground group-focus/menubar-item:text-accent-foreground text-xs tracking-widest;
  }

  .mu-menubar-sub-trigger {
    @apply focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm data-inset:pl-8 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-menubar-sub-content {
    @apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 rounded-md border p-1 shadow-lg;
  }

  /* MARK: Navigation Menu */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/navigation-menu.tsx). Two
     tool-mapping notes: (1) group/navigation-menu is stripped by isStructuralOnlyToken() even
     though upstream also uses it (same class as switch:switch's group/switch), and our
     mu-navigation-menu-trigger's plain "group" hook (no slash-name) is the SAME kind of strip on
     upstream's own bare "group" on NavigationMenuTrigger — both already present in classes.ts
     verbatim. (2) upstream's NavigationMenuViewport fn body has TWO className={cn(...)} calls (an
     outer wrapping div with no data-slot, and the inner real Radix Viewport with
     data-slot="navigation-menu-viewport"); extractParts()'s cnCallMatch regex only captures the
     FIRST one per function, so the tool's "navigation-menu-viewport" slot is actually the OUTER
     wrapper's classes (matching our mu-navigation-menu-viewport-wrapper, already correct, nothing
     to port) — the real inner-viewport styling below was hand-derived from the raw source
     directly and applied to .mu-navigation-menu-viewport instead. */
  .mu-navigation-menu {
    @apply max-w-max;
  }

  .mu-navigation-menu-list {
    @apply gap-1;
  }

  .mu-navigation-menu-trigger {
    @apply bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-open:hover:bg-accent data-open:focus:bg-accent data-open:bg-accent/50 data-open:text-accent-foreground focus-visible:ring-ring/50 data-popup-open:bg-accent/50 data-popup-open:hover:bg-accent rounded-md px-4 py-2 text-sm font-medium transition-[color,box-shadow] focus-visible:ring-3 focus-visible:outline-1 disabled:opacity-50;
  }

  .mu-navigation-menu-link {
    @apply flex-col gap-1 rounded-sm data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex items-center gap-1.5 p-2 text-sm transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground in-data-[slot=navigation-menu-content]:rounded-sm;
  }

  .mu-navigation-menu-trigger-icon {
    @apply relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180;
  }

  .mu-navigation-menu-content {
    @apply data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 p-2 pr-2.5 group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200;
  }

  .mu-navigation-menu-viewport {
    @apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:zoom-out-95 data-open:zoom-in-90 rounded-md border shadow;
  }

  .mu-navigation-menu-indicator {
    @apply data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in;
  }

  .mu-navigation-menu-indicator-arrow {
    @apply bg-border rounded-tl-sm shadow-md;
  }

  .mu-navigation-menu-positioner {
    @apply transition-[top,left,right,bottom] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0;
  }

  .mu-navigation-menu-popup {
    @apply bg-popover text-popover-foreground ring-foreground/10 rounded-lg shadow ring-1 transition-all ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0;
  }

  /* MARK: Native Select */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/native-select.tsx). Draft
     tool mismapped this one: NativeSelect's fn body has TWO data-slots (native-select-wrapper on
     the outer div, native-select on the inner <select>), and the tool's slotMatch regex grabs the
     first — so its "native-select-wrapper" draft output was actually the SELECT's own class
     string. Verified by reading the raw upstream source directly; target below is hand-derived
     against the real native-select-wrapper (bases/base: relative w-fit
     has-[select:disabled]:opacity-50, matching our classes.ts verbatim, nothing to port) and the
     real native-select select element. */
  .mu-native-select {
    @apply border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-9 w-full min-w-0 appearance-none rounded-md border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-3 data-[size=sm]:h-8 data-[size=sm]:py-1;
  }

  .mu-native-select-icon {
    @apply text-muted-foreground top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50;
  }

  /* MARK: Pagination */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/pagination.tsx) */
  .mu-pagination-content {
    @apply flex-row gap-1;
  }

  .mu-pagination-ellipsis {
    @apply size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-pagination-previous {
    @apply gap-1 px-2.5 sm:pl-2.5;
  }

  .mu-pagination-next {
    @apply gap-1 px-2.5 sm:pr-2.5;
  }

  /* MARK: Popover */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/popover.tsx) */
  .mu-popover-content {
    @apply rounded-md border bg-popover p-4 text-popover-foreground shadow-md data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-4 text-sm ring-1 duration-100;
  }

  .mu-popover-content-logical {
    @apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
  }

  .mu-popover-header {
    @apply flex flex-col gap-1 text-sm;
  }

  .mu-popover-title {
    @apply font-medium;
  }

  .mu-popover-description {
    @apply text-muted-foreground;
  }

  /* MARK: Progress */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/progress.tsx) */
  /* Root is the flex layout wrapper for the optional label/value row
   * plus the track below it (progress.marko renders both as
   * children when `label` is set) -- NOT the visible bar itself.
   * bg/height/rounded belong on .mu-progress-track (the actual bar),
   * which already carries the identical values below. Applying them
   * here too forced the root to the bar's height regardless of
   * content, clipping the label row and making it an unreachable
   * scroll container (axe: scrollable-region-focusable). */

  .mu-progress-track {
    @apply bg-primary/20 rounded-full;
  }

  .mu-progress-indicator {
    @apply bg-primary;
  }

  .mu-progress-label {
    @apply text-sm font-medium;
  }

  .mu-progress-value {
    @apply text-muted-foreground ml-auto text-sm tabular-nums;
  }

  /* MARK: Radio Group */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/radio-group.tsx) */
  .mu-radio-group {
    @apply grid gap-3;
  }

  .mu-radio-group-item {
    @apply rounded-full border-input shadow-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 flex size-4;
  }

  .mu-radio-group-item-aria {
    @apply data-selected:bg-primary data-selected:text-primary-foreground dark:data-selected:bg-primary data-selected:border-primary data-focus-visible:border-ring data-focus-visible:ring-ring/50 data-focus-visible:ring-3 data-invalid:data-selected:border-primary data-invalid:border-destructive data-invalid:ring-destructive/20 dark:data-invalid:ring-destructive/40 dark:data-invalid:border-destructive/50 data-invalid:ring-3;
  }

  .mu-radio-group-indicator {
    @apply relative flex size-4 items-center justify-center;
  }

  .mu-radio-group-indicator-icon {
    @apply bg-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full;
  }

  /* MARK: Resizable */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/resizable.tsx) */
  .mu-resizable-handle {
    @apply focus-visible:ring-offset-1;
  }

  .mu-resizable-handle-icon {
    @apply bg-border h-4 w-3 items-center justify-center rounded-xs border;
  }

  /* MARK: Scroll Area */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/scroll-area.tsx) — no
     change from vega; new-york-v4's per-orientation classes already equal vega's rule verbatim
     (see DIVERGENCES's scroll-area:scroll-area-scrollbar entry for the tokenizer-shape note). */
  .mu-scroll-area-scrollbar {
    @apply data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent data-vertical:not-data-[overflow-y]:hidden! data-horizontal:not-data-[overflow-x]:hidden!;
  }

  .mu-scroll-area-thumb {
    @apply rounded-full data-horizontal:h-full data-vertical:w-full;
  }

  /* MARK: Select */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/select.tsx) */
  .mu-select-trigger {
    @apply border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground;
  }

  .mu-select-value {
    @apply flex flex-1 text-left;
  }

  .mu-select-value-aria {
    @apply data-placeholder:text-muted-foreground;
  }

  .mu-select-trigger-icon {
    @apply text-muted-foreground size-4;
  }

  .mu-select-content {
    @apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-32 rounded-md border shadow-md;
  }

  .mu-select-content-logical {
    @apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
  }

  .mu-select-label {
    @apply text-muted-foreground px-2 py-1.5 text-xs;
  }

  .mu-select-item {
    @apply focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2;
  }

  .mu-select-item-aria {
    @apply data-focused:bg-accent data-focused:text-accent-foreground;
  }

  .mu-select-item-indicator {
    @apply pointer-events-none absolute right-2 flex size-3.5 items-center justify-center;
  }

  .mu-select-group {
    @apply scroll-my-1 p-1;
  }

  .mu-select-item-text {
    @apply flex flex-1 gap-2;
  }

  .mu-select-separator {
    @apply bg-border -mx-1 my-1 h-px;
  }

  .mu-select-scroll-up-button {
    @apply flex cursor-default items-center justify-center py-1;
  }

  .mu-select-scroll-down-button {
    @apply flex cursor-default items-center justify-center py-1;
  }

  .mu-select-empty-aria {
    @apply text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/select-list:flex;
  }

  /* MARK: Separator */
  .mu-separator {
    @apply bg-border shrink-0;
  }

  .mu-separator-horizontal {
    @apply h-px w-full;
  }

  .mu-separator-vertical {
    @apply h-full w-px;
  }

  /* MARK: Sheet */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/sheet.tsx). SheetContent's
     per-side classes are a JS ternary on the `side` prop, not a Tailwind data-attribute selector
     (same tokenizer-artifact shape as scroll-area's ScrollBar) — verified by reading the raw
     source directly; our always-rendered data-[side=X] selectors are the semantic equivalent
     (this file's SSR-safe Zag pattern: one element, live data-side attribute, vs. upstream
     switching component output per prop). */
  .mu-sheet-overlay {
    @apply bg-black/50;
  }

  .mu-sheet-content {
    @apply fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-closed:duration-300 data-open:duration-500 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:sm:max-w-sm data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:sm:max-w-sm data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b;
  }

  .mu-sheet-close {
    @apply absolute top-4 right-4 opacity-70 hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 data-open:bg-secondary;
  }

  .mu-sheet-header {
    @apply gap-1.5 p-4;
  }

  .mu-sheet-footer {
    @apply gap-2 p-4;
  }

  .mu-sheet-title {
    @apply text-foreground font-semibold;
  }

  .mu-sheet-description {
    @apply text-muted-foreground text-sm;
  }

  /* MARK: Sidebar */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/sidebar.tsx) */
  .mu-sidebar-trigger {
    @apply size-7;
  }

  .mu-sidebar-gap {
    @apply transition-[width] duration-200 ease-linear;
  }

  .mu-sidebar-inner {
    @apply bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm;
  }

  .mu-sidebar-rail {
    @apply hover:after:bg-sidebar-border;
  }

  .mu-sidebar-inset {
    @apply bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2;
  }

  .mu-sidebar-input {
    @apply bg-background h-8 w-full shadow-none;
  }

  .mu-sidebar-header {
    @apply gap-2 p-2;
  }

  .mu-sidebar-content {
    @apply no-scrollbar gap-2;
  }

  .mu-sidebar-footer {
    @apply gap-2 p-2;
  }

  .mu-sidebar-separator {
    @apply bg-sidebar-border mx-2;
  }

  .mu-sidebar-group {
    @apply p-2;
  }

  .mu-sidebar-menu {
    @apply gap-1;
  }

  .mu-sidebar-group-content {
    @apply text-sm;
  }

  .mu-sidebar-group-label {
    @apply text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4;
  }

  .mu-sidebar-group-action {
    @apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4;
  }

  .mu-sidebar-menu-button {
    @apply ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium;
  }

  .mu-sidebar-menu-button-aria {
    @apply aria-expanded:hover:bg-sidebar-accent aria-expanded:hover:text-sidebar-accent-foreground;
  }

  .mu-sidebar-menu-button-variant-default {
    @apply hover:bg-sidebar-accent hover:text-sidebar-accent-foreground;
  }

  .mu-sidebar-menu-button-variant-outline {
    @apply bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)];
  }

  .mu-sidebar-menu-button-size-default {
    @apply h-8 text-sm;
  }

  .mu-sidebar-menu-button-size-sm {
    @apply h-7 text-xs;
  }

  .mu-sidebar-menu-button-size-lg {
    @apply h-12 text-sm group-data-[collapsible=icon]:p-0!;
  }

  .mu-sidebar-menu-action {
    @apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0;
  }

  .mu-sidebar-menu-badge {
    @apply text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1;
  }

  .mu-sidebar-menu-skeleton {
    @apply h-8 gap-2 rounded-md px-2;
  }

  .mu-sidebar-menu-skeleton-icon {
    @apply size-4 rounded-md;
  }

  .mu-sidebar-menu-skeleton-text {
    @apply h-4;
  }

  .mu-sidebar-menu-sub {
    @apply border-sidebar-border mx-3.5 translate-x-px gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden;
  }

  .mu-sidebar-menu-sub-button {
    @apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4;
  }

  /* MARK: Skeleton */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/skeleton.tsx) */
  .mu-skeleton {
    @apply bg-accent rounded-md;
  }

  /* MARK: Slider */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/slider.tsx) */
  .mu-slider {
    @apply data-vertical:min-h-44;
  }

  .mu-slider-track {
    @apply bg-muted rounded-full data-horizontal:h-1.5 data-horizontal:w-full data-vertical:h-full data-vertical:w-1.5;
  }

  .mu-slider-range {
    @apply bg-primary;
  }

  .mu-slider-thumb {
    @apply border-primary ring-ring/50 size-4 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden;
  }

  /* MARK: Toast */
  .mu-toast {
    @apply rounded-2xl;
  }

  /* MARK: Switch */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/switch.tsx) — no change
     from vega; new-york-v4's colours/sizes already equal vega's rule verbatim (see DIVERGENCES's
     switch:switch entry for the tool-limitation/structural notes). */
  .mu-switch {
    @apply data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px];
  }

  .mu-switch-aria {
    @apply data-selected:bg-primary not-data-selected:bg-input data-focus-visible:border-ring data-focus-visible:ring-ring/50 dark:not-data-selected:bg-input/80 data-focus-visible:ring-3 data-invalid:ring-destructive/20 dark:data-invalid:ring-destructive/40 data-invalid:border-destructive dark:data-invalid:border-destructive/50 data-invalid:ring-3;
  }

  .mu-switch-thumb {
    @apply bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0;
  }

  .mu-switch-thumb-aria {
    @apply dark:not-data-selected:bg-foreground dark:data-selected:bg-primary-foreground group-data-[size=default]/switch:data-selected:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-selected:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:not-data-selected:translate-x-0 group-data-[size=sm]/switch:not-data-selected:translate-x-0;
  }

  /* MARK: Table */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/table.tsx) */
  .mu-table-container {
    @apply relative w-full overflow-x-auto;
  }

  .mu-table {
    @apply w-full caption-bottom text-sm;
  }

  .mu-table-header {
    @apply [&_tr]:border-b;
  }

  .mu-table-body {
    @apply [&_tr:last-child]:border-0;
  }

  .mu-table-footer {
    @apply bg-muted/50 border-t font-medium [&>tr]:last:border-b-0;
  }

  .mu-table-row {
    @apply hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors;
  }

  .mu-table-row-aria {
    @apply data-selected:bg-muted;
  }

  .mu-table-head {
    @apply text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px];
  }

  .mu-table-head-aria {
    @apply [&:has([data-slot=checkbox])]:pr-0;
  }

  .mu-table-cell {
    @apply p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px];
  }

  .mu-table-cell-aria {
    @apply [&:has([data-slot=checkbox])]:pr-0;
  }

  .mu-table-caption {
    @apply text-muted-foreground mt-4 text-sm;
  }

  /* MARK: Tabs */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/tabs.tsx) */
  .mu-tabs {
    @apply gap-2;
  }

  .mu-tabs-list {
    @apply rounded-lg p-[3px] group-data-horizontal/tabs:h-9 data-[variant=line]:rounded-none;
  }

  .mu-tabs-trigger {
    @apply gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5;
  }

  .mu-tabs-trigger-aria {
    @apply group-data-[variant=default]/tabs-list:data-selected:shadow-sm group-data-[variant=line]/tabs-list:data-selected:shadow-none;
  }

  /* mu-tabs-content: new-york-v4 sets no classes beyond flex-1 outline-none, already structural
     (classes.ts) — nothing to port. */

  /* MARK: Textarea */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/textarea.tsx) */
  .mu-textarea {
    @apply rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:aria-invalid:border-destructive/50;
  }

  /* MARK: Toggle */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/toggle.tsx) */
  .mu-toggle {
    @apply gap-2 rounded-md text-sm font-medium transition-[color,box-shadow] hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-accent aria-pressed:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-toggle-aria {
    @apply data-selected:bg-accent data-selected:text-accent-foreground;
  }

  .mu-toggle-variant-default {
    @apply bg-transparent;
  }

  .mu-toggle-variant-outline {
    @apply border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground;
  }

  .mu-toggle-size-default {
    @apply h-9 min-w-9 px-2 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2;
  }

  .mu-toggle-size-sm {
    @apply h-8 min-w-8 px-1.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5;
  }

  .mu-toggle-size-lg {
    @apply h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2;
  }

  /* MARK: Toggle Group */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/toggle-group.tsx) */
  .mu-toggle-group {
    @apply rounded-md data-[spacing=0]:data-[variant=outline]:shadow-xs;
  }

  .mu-toggle-group-item {
    @apply w-auto min-w-0 px-3 data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t;
  }

  /* MARK: Tooltip */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/tooltip.tsx) */
  .mu-tooltip-content {
    @apply animate-in text-balance fade-in-0 zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm;
  }

  .mu-tooltip-content-logical {
    @apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
  }

  .mu-tooltip-arrow {
    @apply z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px];
  }

  .mu-tooltip-arrow-logical {
    @apply data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2;
  }

  /* MARK: Input Group */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/input-group.tsx). Draft
     tool mismapped input-group-control: extractParts()'s guessSlotForVariants() walks forward
     from inputGroupButtonVariants's cva() declaration looking for the next data-slot in the file
     and lands on InputGroupInput's (unrelated, further down) — InputGroupButton itself renders
     <Button> with no data-slot of its own. Verified by reading the raw source: our
     mu-input-group-button* rules (below) are the real target for that variant group; the actual
     input-group-control slot is InputGroupInput/InputGroupTextarea, matching our
     mu-input-group-input/-textarea rules (unaffected, still under their own MARK section). */
  .mu-input-group {
    @apply border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-9 rounded-md border shadow-xs transition-[color,box-shadow] in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-2 has-[>[data-align=inline-start]]:[&>input]:pl-2;
  }

  .mu-input-group-addon {
    @apply text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4;
  }

  .mu-input-group-addon-align-inline-start {
    @apply pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem];
  }

  .mu-input-group-addon-align-inline-end {
    @apply pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem];
  }

  .mu-input-group-addon-align-block-start {
    @apply px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3;
  }

  .mu-input-group-addon-align-block-end {
    @apply px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3;
  }

  .mu-input-group-button {
    @apply gap-2 text-sm;
  }

  .mu-input-group-button-size-xs {
    @apply h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5;
  }

  .mu-input-group-button-size-sm {
    @apply h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5;
  }

  .mu-input-group-button-size-icon-xs {
    @apply size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0;
  }

  .mu-input-group-button-size-icon-sm {
    @apply size-8 p-0 has-[>svg]:p-0;
  }

  .mu-input-group-text {
    @apply text-muted-foreground gap-2 text-sm [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-input-group-input {
    @apply rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent;
  }

  .mu-input-group-textarea {
    @apply rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent;
  }

  /* MARK: Menu Translucent */
  .mu-menu-translucent {
    @apply animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!;
  }

  .mu-menu-translucent-aria {
    @apply **:data-[slot$=-item]:data-focused:bg-foreground/10;
  }

  /* MARK: RTL — marko-ui addition, not vendored from upstream: upstream
     inlines the `cn-rtl-flip` marker as `rtl:rotate-180` at install time
     (packages/shadcn/src/utils/transformers/transform-rtl.ts); this
     source-shipped distribution has no install-time step, so the hook
     carries the rule instead. */
  .mu-rtl-flip {
    @apply rtl:rotate-180;
  }

  /* MARK: Bubble */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/bubble.tsx) — no change from
     vega; new-york-v4's classes already equal vega's rule verbatim. */
  .mu-bubble {
    @apply gap-1 data-[align=end]:self-end max-w-[80%] data-[variant=ghost]:max-w-full group-data-[align=end]/message:self-end;
  }

  .mu-bubble-content {
    @apply rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50 group-data-[align=end]/bubble:self-end;
  }

  .mu-bubble-variant-default {
    @apply *:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80;
  }

  .mu-bubble-variant-secondary {
    @apply *:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)];
  }

  .mu-bubble-variant-muted {
    @apply *:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)];
  }

  .mu-bubble-variant-tinted {
    @apply *:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)];
  }

  .mu-bubble-variant-outline {
    @apply *:data-[slot=bubble-content]:bg-background *:data-[slot=bubble-content]:border-border [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30;
  }

  .mu-bubble-variant-ghost {
    @apply *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50 border-none;
  }

  .mu-bubble-variant-destructive {
    @apply *:data-[slot=bubble-content]:bg-destructive/10 dark:*:data-[slot=bubble-content]:bg-destructive/20 *:data-[slot=bubble-content]:text-destructive [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30;
  }

  .mu-bubble-reactions {
    @apply rounded-full ring-3 ring-card bg-muted shrink-0 gap-1 px-1.5 py-0.5 has-[button]:p-0 text-sm;
  }

  .mu-bubble-reactions-side-top {
    @apply top-0 -translate-y-3/4;
  }

  .mu-bubble-reactions-side-bottom {
    @apply bottom-0 translate-y-3/4;
  }

  .mu-bubble-reactions-align-start {
    @apply left-3;
  }

  .mu-bubble-reactions-align-end {
    @apply right-3;
  }

  .mu-bubble-group {
    @apply gap-2;
  }

  /* MARK: Attachment */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/attachment.tsx) — no change
     from vega; new-york-v4's classes already equal vega's rule verbatim. */
  .mu-attachment {
    @apply rounded-xl w-fit focus-within:ring-1 focus-within:ring-ring/50;
  }

  .mu-attachment-orientation-horizontal {
    @apply min-w-40;
  }

  .mu-attachment-orientation-vertical {
    @apply w-24 has-data-[slot=attachment-content]:w-30;
  }

  .mu-attachment-size-default {
    @apply gap-2 has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2 text-sm;
  }

  .mu-attachment-size-sm {
    @apply gap-2.5 has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5 text-xs;
  }

  .mu-attachment-size-xs {
    @apply gap-1.5 has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1 text-xs rounded-lg;
  }

  .mu-attachment-media {
    @apply bg-muted text-foreground w-10 rounded-lg group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md [&_svg:not([class*='size-'])]:size-4 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5 group-data-[orientation=vertical]/attachment:w-full group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6!;
  }

  .mu-attachment-media-variant-image {
    @apply opacity-60 group-data-[state=idle]/attachment:opacity-100 group-data-[state=done]/attachment:opacity-100;
  }

  .mu-attachment-content {
    @apply leading-tight group-data-[orientation=vertical]/attachment:px-1;
  }

  .mu-attachment-title {
    @apply font-medium;
  }

  .mu-attachment-description {
    @apply mt-0.5 text-xs;
  }

  .mu-attachment-actions {
    @apply group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 relative z-20 group-data-[orientation=vertical]/attachment:gap-1;
  }

  .mu-attachment-group {
    @apply gap-3 scroll-px-1 py-1;
  }

  .mu-attachment-trigger {
    @apply absolute inset-0 z-10 outline-none;
  }

  /* MARK: Marker */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/marker.tsx) — no change
     from vega; new-york-v4's classes already equal vega's rule verbatim. */
  .mu-marker {
    @apply gap-2 text-sm text-muted-foreground [a]:hover:text-foreground [a]:underline-offset-3 [a]:underline [&_svg:not([class*='size-'])]:size-4 min-h-4 text-left;
  }

  .mu-marker-variant-separator {
    @apply before:h-px before:min-w-0 before:flex-1 before:bg-border after:h-px after:min-w-0 after:flex-1 after:bg-border before:mr-1 after:ml-1;
  }

  .mu-marker-variant-border {
    @apply border-b border-border pb-2;
  }

  .mu-marker-icon {
    @apply size-4 [&_svg:not([class*='size-'])]:size-4;
  }

  .mu-marker-content {
    @apply group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:hover:text-foreground *:[a]:underline *:[a]:underline-offset-3;
  }

  /* MARK: Message Scroller */
  /* new-york: ported from new-york-v4 (apps/v4/registry/new-york-v4/ui/message-scroller.tsx) */
  .mu-message-scroller-viewport {
    @apply data-pending-scroll:invisible;
  }

  .mu-message-scroller-content {
    @apply gap-8;
  }

  /* MARK: Message */
  .mu-message {
    @apply text-sm gap-2;
  }

  .mu-message-avatar {
    @apply min-w-8 group-has-data-[slot=message-footer]/message:-translate-y-8;
  }

  .mu-message-content {
    @apply gap-2.5 group-data-[align=end]/message:*:data-slot:self-end;
  }

  .mu-message-header {
    @apply text-xs font-medium text-muted-foreground px-3 group-has-data-[variant=ghost]/message:px-0;
  }

  .mu-message-footer {
    @apply text-xs font-medium text-muted-foreground px-3 group-has-data-[variant=ghost]/message:px-0;
  }

  .mu-message-group {
    @apply gap-2;
  }

  /* MARK: React Aria */
  .mu-alert-dialog-overlay-aria {
    @apply data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs;
  }

  .mu-alert-dialog-content-aria {
    @apply data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 data-exiting:zoom-out-95 data-entering:zoom-in-95 bg-popover text-popover-foreground ring-foreground/10 gap-6 rounded-xl p-6 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg;
  }

  .mu-combobox-content-aria {
    @apply bg-popover text-popover-foreground data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 data-exiting:zoom-out-95 data-entering:zoom-in-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 max-h-72 min-w-36 overflow-hidden rounded-md shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none;
  }

  .mu-context-menu-content-aria {
    @apply data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 data-exiting:zoom-out-95 data-entering:zoom-in-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-36 rounded-md p-1 shadow-md ring-1 duration-100;
  }

  .mu-dialog-overlay-aria {
    @apply data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs;
  }

  .mu-dialog-content-aria {
    @apply bg-popover text-popover-foreground data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 data-exiting:zoom-out-95 data-entering:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-6 rounded-xl p-6 text-sm ring-1 duration-100 sm:max-w-md;
  }

  .mu-dropdown-menu-content-aria {
    @apply data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 data-exiting:zoom-out-95 data-entering:zoom-in-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-md p-1 shadow-md ring-1 duration-100;
  }

  .mu-popover-content-aria {
    @apply bg-popover text-popover-foreground data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 data-exiting:zoom-out-95 data-entering:zoom-in-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 duration-100;
  }

  .mu-hover-card-content-aria {
    @apply data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 data-exiting:zoom-out-95 data-entering:zoom-in-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground w-64 rounded-lg p-4 text-sm shadow-md ring-1 duration-100;
  }

  .mu-select-content-aria {
    @apply bg-popover text-popover-foreground data-entering:animate-in data-exiting:animate-out data-exiting:fade-out-0 data-entering:fade-in-0 data-exiting:zoom-out-95 data-entering:zoom-in-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100;
  }

  .mu-tooltip-content-aria {
    @apply data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:fade-out-0 data-exiting:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm;
  }

  .mu-context-menu-sub-content-aria {
    @apply bg-popover text-popover-foreground min-w-32 rounded-md border p-1 shadow-lg duration-100;
  }

  .mu-dropdown-menu-sub-content-aria {
    @apply ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100;
  }
}
