/* DesktopHoldingArea — collapsible bottom-edge strip for the units a host's
 * bounded pages could not keep (ADR-0034). Theme-aware through the shared
 * `--sdi-*` tokens (which follow the app's `--luce-color-*` theme
 * variables, dark theme included). */

.sdi-holding-area {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  max-width: min(720px, calc(100% - 32px));
  border: var(--sdi-stroke) solid var(--sdi-luce-3);
  border-radius: var(--sdi-radius-lg);
  /* Desktop chrome, not a desktop object: the opaque application surface. */
  background: var(--luce-color-background-secondary);
  box-shadow: var(--sdi-shadow-md);
  color: var(--sdi-ink);
  font: var(--sdi-text-c1);
  transition: box-shadow var(--luce-motion-fast) var(--luce-ease-out);
}

.sdi-holding-area[data-drop-active] {
  box-shadow: var(--sdi-ring-accent), var(--sdi-shadow-md);
}

.sdi-holding-area button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

/* Collapsed: a slim handle bar with the overflow count. */
.sdi-holding-area[data-collapsed="true"] {
  border-radius: var(--sdi-radius-full);
}

.sdi-holding-area__handle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px 4px 10px;
  border-radius: var(--sdi-radius-full);
  color: var(--sdi-ink-muted);
}

.sdi-holding-area__handle:hover {
  color: var(--sdi-ink);
  background: var(--sdi-fill-2);
}

.sdi-holding-area__handle:focus-visible,
.sdi-holding-area__collapse:focus-visible,
.sdi-holding-area__unit:focus-visible {
  outline: none;
  box-shadow: var(--sdi-ring-accent);
}

.sdi-holding-area__handle-count {
  font: var(--sdi-text-c1-emphasized);
}

/* Expanded: header row plus the flow strip of held units. */
.sdi-holding-area__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 4px 12px;
}

.sdi-holding-area__title {
  font: var(--sdi-text-c1-emphasized);
}

.sdi-holding-area__count {
  color: var(--sdi-ink-soft);
}

.sdi-holding-area__collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: var(--sdi-radius-sm);
  color: var(--sdi-ink-muted);
}

.sdi-holding-area__collapse:hover {
  color: var(--sdi-ink);
  background: var(--sdi-fill-2);
}

.sdi-holding-area__body {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 8px 8px;
  /* One icon row is ~76px tall; the strip caps at roughly two rows and
   * scrolls its own overflow. */
  max-height: 152px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sdi-holding-area__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 72px;
  padding: 6px 4px;
  border-radius: var(--sdi-radius-sm);
}

.sdi-holding-area__unit:hover {
  background: var(--sdi-fill-2);
}

.sdi-holding-area__unit:active {
  background: var(--sdi-fill-3);
}

.sdi-holding-area__unit-icon {
  width: 32px;
  height: 32px;
  color: var(--sdi-ink-muted);
}

.sdi-holding-area__unit-icon--image {
  object-fit: contain;
}

.sdi-holding-area__unit-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--sdi-ink);
}
/* The shared icon grid (Icon.tsx) and the DOM motion of the animated icons
   (@luce/plugin-sdk/icons). An icon plays once while it carries data-playing
   (iconPlayback.ts sets and clears it); every moving part plays one verb of
   the SDK's motion grammar (ICON_GRAMMAR), whose keyframes, easing and timing
   are written here by hand and held equal to it by the SDK's
   icon-css-parity.test.ts, which reads this file.
   Each part starts and ends at rest and moves only transforms, opacity or its
   dash offset. One beat is twice the slow timing token (520 ms at the
   defaults); no part runs past it. A turn lands on a symmetry of its part
   and rides the settle spring; everything else eases in and out at each
   turning point, a stroke drawing in eases out. Nothing plays under the
   motion preference: the player checks it, and the rules below exist only
   without it. */

@property --luce-icon-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@property --luce-icon-dx {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --luce-icon-dy {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --luce-icon-scale {
  syntax: "<number>+";
  inherits: false;
  initial-value: 1;
}

@property --luce-icon-scale-2 {
  syntax: "<number>+";
  inherits: false;
  initial-value: 1;
}

@property --luce-icon-rebound {
  syntax: "<number>";
  inherits: false;
  initial-value: -0.25;
}

@property --luce-icon-opacity {
  syntax: "<number>";
  inherits: false;
  initial-value: 0.3;
}

@property --luce-icon-from {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

@property --luce-icon-delay {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

@property --luce-icon-length {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

.luce-icon {
  --luce-icon-beat: calc(var(--luce-motion-slow) * 2);
  display: inline-block;
  flex-shrink: 0;
  overflow: visible;
  color: currentColor;
  vertical-align: middle;
}

.luce-icon__turn,
.luce-icon__spin,
.luce-icon__sway,
.luce-icon__nudge,
.luce-icon__pop,
.luce-icon__draw,
.luce-icon__flash {
  --luce-icon-run: calc(var(--luce-icon-beat) * var(--luce-icon-length));
  --luce-icon-wait: calc(var(--luce-icon-beat) * var(--luce-icon-delay));
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .luce-icon[data-playing] .luce-icon__turn {
    animation:
      luce-icon-turn var(--luce-motion-spring) var(--luce-ease-spring) var(--luce-icon-wait)
        backwards,
      luce-icon-mid-scale var(--luce-motion-spring) var(--luce-ease-in-out) var(--luce-icon-wait)
        backwards;
  }

  .luce-icon[data-playing] .luce-icon__spin {
    animation:
      luce-icon-turn var(--luce-icon-run) var(--luce-ease-in-out) var(--luce-icon-wait) backwards,
      luce-icon-mid-scale var(--luce-icon-run) var(--luce-ease-in-out) var(--luce-icon-wait)
        backwards;
  }

  .luce-icon[data-playing] .luce-icon__sway {
    animation: luce-icon-sway var(--luce-icon-run) var(--luce-ease-in-out) var(--luce-icon-wait)
      backwards;
  }

  .luce-icon[data-playing] .luce-icon__nudge {
    animation: luce-icon-nudge var(--luce-icon-run) var(--luce-ease-in-out) var(--luce-icon-wait)
      backwards;
  }

  .luce-icon[data-playing] .luce-icon__pop {
    animation: luce-icon-pop var(--luce-icon-run) var(--luce-ease-in-out) var(--luce-icon-wait)
      backwards;
  }

  .luce-icon[data-playing] .luce-icon__draw {
    animation: luce-icon-draw var(--luce-icon-run) var(--luce-ease-out) var(--luce-icon-wait)
      backwards;
  }

  .luce-icon[data-playing] .luce-icon__flash {
    animation: luce-icon-flash var(--luce-icon-run) var(--luce-ease-in-out) var(--luce-icon-wait)
      backwards;
  }
}

@keyframes luce-icon-turn {
  from {
    rotate: 0deg;
  }

  to {
    rotate: var(--luce-icon-angle);
  }
}

@keyframes luce-icon-mid-scale {
  50% {
    scale: var(--luce-icon-scale);
  }
}

@keyframes luce-icon-sway {
  25% {
    translate: var(--luce-icon-dx) var(--luce-icon-dy);
    rotate: var(--luce-icon-angle);
  }

  50% {
    translate: calc(var(--luce-icon-dx) * -0.8) calc(var(--luce-icon-dy) * -0.8);
    rotate: calc(var(--luce-icon-angle) * -0.8);
  }

  75% {
    translate: calc(var(--luce-icon-dx) * 0.4) calc(var(--luce-icon-dy) * 0.4);
    rotate: calc(var(--luce-icon-angle) * 0.4);
  }
}

@keyframes luce-icon-nudge {
  40% {
    translate: var(--luce-icon-dx) var(--luce-icon-dy);
    rotate: var(--luce-icon-angle);
  }

  75% {
    translate: calc(var(--luce-icon-dx) * var(--luce-icon-rebound))
      calc(var(--luce-icon-dy) * var(--luce-icon-rebound));
    rotate: calc(var(--luce-icon-angle) * var(--luce-icon-rebound));
  }
}

@keyframes luce-icon-pop {
  35% {
    scale: var(--luce-icon-scale);
  }

  70% {
    scale: var(--luce-icon-scale-2);
  }
}

@keyframes luce-icon-draw {
  from {
    stroke-dasharray: 1 1;
    stroke-dashoffset: var(--luce-icon-from);
  }

  to {
    stroke-dasharray: 1 1;
    stroke-dashoffset: 0;
  }
}

@keyframes luce-icon-flash {
  50% {
    opacity: var(--luce-icon-opacity);
  }
}
.luce-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 32px;
  gap: 4px;
  border: var(--luce-stroke-hairline) solid transparent;
  border-radius: var(--luce-radius-md);
  padding: 0 10px;
  font: var(--luce-text-b2-emphasized);
  color: var(--luce-color-label-primary);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition:
    background-color var(--luce-motion-fast) var(--luce-ease-out),
    border-color var(--luce-motion-fast) var(--luce-ease-out),
    color var(--luce-motion-fast) var(--luce-ease-out),
    box-shadow var(--luce-motion-fast) var(--luce-ease-out),
    transform var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-button:disabled {
  cursor: not-allowed;
  color: var(--luce-color-label-quaternary);
  opacity: 1;
  transform: none;
}

.luce-button:focus-visible {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: 2px;
}

.luce-button:active:not(:disabled) {
  transform: scale(var(--luce-press-scale));
}

/* Sizes */
.luce-button--26 {
  min-width: 52px;
  height: 26px;
  padding: 0 8px;
  gap: 2px;
  font: var(--luce-text-c1-emphasized);
  border-radius: var(--luce-radius-sm);
}

.luce-button--32 {
  min-width: 62px;
  height: 32px;
  padding: 0 10px;
  gap: 4px;
  font: var(--luce-text-b2-emphasized);
}

.luce-button--44 {
  min-width: 72px;
  height: 44px;
  padding: 0 14px;
  gap: 6px;
  font: var(--luce-text-t2-emphasized);
  border-radius: var(--luce-radius-lg);
}

.luce-button--with-left-icon.luce-button--26 {
  padding-left: 6px;
}

.luce-button--with-left-icon.luce-button--32 {
  padding-left: 8px;
}

.luce-button--with-left-icon.luce-button--44 {
  padding-left: 10px;
  padding-right: 12px;
}

.luce-button--with-right-icon.luce-button--26 {
  padding-right: 6px;
}

.luce-button--with-right-icon.luce-button--32 {
  padding-right: 8px;
}

.luce-button--with-right-icon.luce-button--44 {
  padding-left: 12px;
  padding-right: 10px;
}

/* Variants */
.luce-button--primary {
  color: var(--luce-color-background-primary);
  background: var(--luce-color-label-primary);
}

.luce-button--primary:disabled {
  color: var(--luce-color-label-quaternary);
  background: var(--luce-color-fill-2);
}

@media (hover: hover) and (pointer: fine) {
  .luce-button--primary:hover:not(:disabled) {
    background: var(--luce-color-label-primary-hover);
  }
}

.luce-button--primary:active:not(:disabled) {
  background: var(--luce-color-label-primary);
}

.luce-button--secondary {
  color: var(--luce-color-label-primary);
  background: var(--luce-color-fill-1);
  border-color: transparent;
}

.luce-button--secondary:disabled {
  background: var(--luce-color-fill-1);
}

@media (hover: hover) and (pointer: fine) {
  .luce-button--secondary:hover:not(:disabled) {
    background: var(--luce-color-fill-2);
    border-color: transparent;
  }
}

.luce-button--outline {
  color: var(--luce-color-label-primary);
  background: transparent;
  border-color: var(--luce-color-border);
}

.luce-button--outline:disabled {
  background: transparent;
  border-color: var(--luce-color-separator);
}

@media (hover: hover) and (pointer: fine) {
  .luce-button--outline:hover:not(:disabled) {
    background: var(--luce-color-fill-1);
    border-color: var(--luce-color-border-strong);
  }
}

.luce-button--primary.luce-button--danger {
  color: var(--luce-color-always-white);
  background: var(--luce-color-danger);
}

@media (hover: hover) and (pointer: fine) {
  .luce-button--primary.luce-button--danger:hover:not(:disabled) {
    background: var(--luce-color-danger-hover);
  }
}

.luce-button--primary.luce-button--danger:active:not(:disabled) {
  background: var(--luce-color-danger-active);
}

.luce-button--secondary.luce-button--danger,
.luce-button--outline.luce-button--danger {
  color: var(--luce-color-danger);
}

/* Icon-only */
.luce-button--icon-only {
  padding: 0;
  min-width: 0;
}

.luce-button--icon-only.luce-button--26 {
  width: 26px;
}

.luce-button--icon-only.luce-button--32 {
  width: 32px;
}

.luce-button--icon-only.luce-button--44 {
  width: 44px;
}

.luce-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.luce-button--26 .luce-button__icon {
  width: 16px;
  height: 16px;
}

.luce-button--44 .luce-button__icon {
  width: 20px;
  height: 20px;
}

.luce-button__icon > svg {
  width: 100%;
  height: 100%;
}

.luce-button__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.luce-button__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: luce-spin 0.8s linear infinite;
}

.luce-button--loading .luce-button__label,
.luce-button--loading .luce-button__icon {
  opacity: 0.82;
}

@keyframes luce-spin {
  to {
    transform: rotate(360deg);
  }
}
.luce-card {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 560px;
  padding: var(--luce-space-sm);
  background: var(--luce-color-background-primary);
  border-radius: var(--luce-radius-lg);
  border: var(--luce-stroke-hairline) solid var(--luce-color-separator);
  overflow: hidden;
  transition:
    background-color var(--luce-motion-fast) var(--luce-ease-out),
    border-color var(--luce-motion-fast) var(--luce-ease-out),
    box-shadow var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-card--compact {
  border-radius: var(--luce-radius-sm);
}

.luce-card__media {
  overflow: hidden;
  border-radius: var(--luce-radius-sm);
}

.luce-card--compact .luce-card__media {
  border-radius: var(--luce-radius-xxs);
}

.luce-card__content {
  display: grid;
  gap: var(--luce-space-sm);
  padding: var(--luce-space-lg) var(--luce-space-lg) var(--luce-space-lg);
  color: var(--luce-color-label-primary);
}

@media (hover: hover) and (pointer: fine) {
  .luce-card:is(a, button):hover {
    background: var(--luce-color-fill-1);
  }
}
.luce-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--luce-space-sm);
  min-height: 32px;
  padding: var(--luce-space-sm);
  cursor: pointer;
  color: var(--luce-color-label-primary);
}

.luce-control__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.luce-control__circle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 1.8px solid var(--luce-color-label-secondary);
  border-radius: 50%;
  background: transparent;
  color: var(--luce-color-on-accent);
  transition:
    background-color var(--luce-motion-medium) var(--luce-ease-out),
    border-color var(--luce-motion-medium) var(--luce-ease-out),
    box-shadow var(--luce-motion-medium) var(--luce-ease-out);
}

.luce-control--16 .luce-control__circle {
  --selection-check-size: 10px;
  --selection-check-stroke: 2.2;
  width: 16px;
  height: 16px;
}

.luce-control--20 .luce-control__circle {
  --selection-check-size: 12px;
  --selection-check-stroke: 2.4;
  width: 20px;
  height: 20px;
}

.luce-control--24 .luce-control__circle {
  --selection-check-size: 14px;
  --selection-check-stroke: 2.8;
  width: 24px;
  height: 24px;
}

/* The shared check (ActionIcon). It fades in; checking the box by hand also
   plays the icon's own draw (Checkbox), so the mark has no scale of its own. */
.luce-control__circle svg {
  width: var(--selection-check-size);
  height: var(--selection-check-size);
  opacity: 0;
  transition: opacity var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-control--16 .luce-control__circle svg {
  stroke-width: var(--selection-check-stroke);
}

.luce-control--20 .luce-control__circle svg {
  stroke-width: var(--selection-check-stroke);
}

.luce-control--24 .luce-control__circle svg {
  stroke-width: var(--selection-check-stroke);
}

@media (hover: hover) and (pointer: fine) {
  .luce-control:hover .luce-control__input:not(:disabled):not(:checked) + .luce-control__circle {
    border-color: var(--luce-color-label-primary);
  }

  .luce-control:hover .luce-control__input:not(:disabled):checked + .luce-control__circle {
    background: var(--luce-color-accent-hover);
    border-color: transparent;
  }
}

.luce-control__input:checked + .luce-control__circle {
  background: var(--luce-color-accent);
  border-color: transparent;
}

.luce-control__input:checked + .luce-control__circle svg {
  opacity: 1;
}

.luce-control__input:focus-visible + .luce-control__circle {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: 2px;
}

.luce-control__input:disabled {
  cursor: not-allowed;
}

.luce-control:has(.luce-control__input:disabled) {
  cursor: not-allowed;
  opacity: 0.4;
}

.luce-control__label {
  min-width: 0;
  overflow: hidden;
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Forced colors drop the accent fill: the checked circle takes the system
   highlight and the check its text color, so the state stays visible. */
@media (forced-colors: active) {
  .luce-control__circle {
    border-color: CanvasText;
  }

  .luce-control__input:checked + .luce-control__circle {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
}
/* The layer is the native <dialog> itself, stretched over the viewport as the
   scrim; the card inside it is the surface. Clicks that land on the layer
   are backdrop clicks. Enter: the scrim fades in and the card springs up
   from a slightly smaller scale. Exit: the dialog is already closed (the page
   is interactive again) while `display` and `overlay` hold it on screen for
   the shorter, smaller fade out. */
.luce-modal-layer {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: var(--luce-space-2xl);
  border: 0;
  background: var(--luce-color-mask-base);
  color: var(--luce-color-label-primary);
  opacity: 1;
  overflow: hidden;
  transition:
    opacity var(--luce-motion-medium) var(--luce-ease-out),
    display var(--luce-motion-fast) allow-discrete,
    overlay var(--luce-motion-fast) allow-discrete;
}

.luce-modal-layer:not([open]) {
  display: none;
}

.luce-modal-layer::backdrop {
  background: transparent;
}

.luce-modal-layer:focus,
.luce-modal-layer:focus-visible {
  outline: none;
}

.luce-modal-layer[data-state="closing"] {
  opacity: 0;
  pointer-events: none;
  transition-duration: var(--luce-motion-fast);
}

@starting-style {
  .luce-modal-layer[open] {
    opacity: 0;
  }
}

.luce-modal {
  --luce-modal-pad: var(--luce-space-2xl);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--luce-space-lg);
  width: min(560px, 100%);
  max-height: 100%;
  padding: var(--luce-modal-pad);
  border: var(--luce-stroke-hairline) solid transparent;
  border-radius: var(--luce-radius-xl);
  background: var(--luce-color-surface-floating);
  box-shadow: var(--luce-shadow-floating);
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2);
  scale: 1;
  transition: scale var(--luce-motion-spring) var(--luce-ease-spring);
}

[data-state="closing"] > .luce-modal {
  scale: 0.99;
  transition: scale var(--luce-motion-fast) var(--luce-ease-out);
}

@starting-style {
  .luce-modal-layer[open] > .luce-modal {
    scale: 0.98;
  }
}

.luce-modal--small {
  --luce-modal-pad: var(--luce-space-xl);
  gap: var(--luce-space-md);
  width: min(400px, 100%);
}

.luce-modal--large {
  width: min(720px, 100%);
}

.luce-modal__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--luce-space-md);
  min-width: 0;
}

.luce-modal__title-group {
  display: grid;
  min-width: 0;
  gap: var(--luce-space-xs);
}

.luce-modal__title {
  margin: 0;
  font: var(--luce-text-t2-emphasized);
  color: var(--luce-color-label-primary);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.luce-modal__description {
  margin: 0;
  font: var(--luce-text-b2);
  color: var(--luce-color-label-secondary);
  text-wrap: pretty;
}

.luce-modal__close {
  flex: 0 0 auto;
  margin-block-start: calc(var(--luce-space-xs) * -1);
  margin-inline-end: calc(var(--luce-space-xs) * -1);
}

/* The body scrolls between a fixed header and footer; it spans the card's
   full width so its scrollbar sits on the card's edge, not inside the text. */
.luce-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  margin-inline: calc(var(--luce-modal-pad) * -1);
  padding-inline: var(--luce-modal-pad);
  overflow: auto;
  overscroll-behavior: contain;
}

.luce-modal__detail {
  margin: 0;
  font: var(--luce-text-b2);
  color: var(--luce-color-label-secondary);
  overflow-wrap: anywhere;
}

.luce-modal__footer {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--luce-space-sm);
}
.luce-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  padding: 16px clamp(var(--luce-space-lg), 8vw, 120px);
  background: var(--luce-color-background-primary);
  border-bottom: var(--luce-stroke-hairline) solid var(--luce-color-separator);
}

.luce-header__slot {
  display: flex;
  align-items: center;
  gap: var(--luce-space-sm);
  min-width: 0;
}

.luce-header__slot--center {
  justify-content: center;
}

.luce-header__slot--trailing {
  justify-content: flex-end;
}
.luce-field {
  display: flex;
  flex-direction: column;
  gap: var(--luce-space-xs);
}

.luce-field__label {
  font: var(--luce-text-b2-emphasized);
  color: var(--luce-color-label-primary);
}

.luce-field__helper {
  font: var(--luce-text-c1);
  color: var(--luce-color-label-tertiary);
}

.luce-field__error {
  font: var(--luce-text-c1);
  color: var(--luce-color-danger);
}

/* The field's strong bottom edge identifies it as an input (3:1 against its
   surface); focus turns that edge into a 2 px accent line. */
.luce-input {
  height: 40px;
  padding: 10px 12px;
  border: var(--luce-stroke-hairline) solid var(--luce-color-fill-1);
  border-bottom: var(--luce-stroke-border) solid var(--luce-color-label-secondary);
  border-radius: var(--luce-radius-lg);
  background: var(--luce-color-fill-1);
  font: var(--luce-text-b2);
  color: var(--luce-color-label-primary);
  transition:
    background-color var(--luce-motion-fast) var(--luce-ease-out),
    border-color var(--luce-motion-fast) var(--luce-ease-out),
    box-shadow var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-input::placeholder {
  color: var(--luce-color-label-tertiary);
}

@media (hover: hover) and (pointer: fine) {
  .luce-input:hover:not(:disabled):not(:focus) {
    background: var(--luce-color-fill-2);
  }
}

.luce-input:focus {
  outline: none;
  background: var(--luce-color-fill-1);
  border-bottom-color: var(--luce-color-accent);
  box-shadow: inset 0 -1px 0 var(--luce-color-accent);
}

.luce-input:disabled {
  background: var(--luce-color-fill-2);
  border-color: var(--luce-color-fill-2);
  color: var(--luce-color-label-quaternary);
  cursor: not-allowed;
}

.luce-input--error,
.luce-input--error:focus {
  border-bottom-color: var(--luce-color-danger);
}

.luce-input--error:focus {
  box-shadow: inset 0 -1px 0 var(--luce-color-danger);
}

/* Chromium's own clear glyph on a search field: the shared clear button
   (Input's onClear) replaces it; Escape still clears natively. */
.luce-input::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}

/* A field with a leading icon or a clear button: both sit inside the
   field's box, on its vertical center, and the text keeps clear of them. */
.luce-input-shell {
  position: relative;
  display: grid;
  align-items: center;
}

.luce-input-shell > .luce-input {
  min-width: 0;
}

.luce-input-shell--icon > .luce-input {
  padding-inline-start: calc(var(--luce-space-md) + 16px + var(--luce-space-sm));
}

.luce-input-shell--clearable > .luce-input {
  padding-inline-end: calc(var(--luce-space-xs) + 24px + var(--luce-space-xs));
}

.luce-input-shell__icon {
  position: absolute;
  inset-inline-start: var(--luce-space-md);
  color: var(--luce-color-label-secondary);
  pointer-events: none;
}

.luce-input-shell:has(.luce-input:disabled) .luce-input-shell__icon {
  color: var(--luce-color-label-quaternary);
}

.luce-input-shell__clear {
  position: absolute;
  inset-inline-end: var(--luce-space-xs);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--luce-radius-sm);
  background: transparent;
  color: var(--luce-color-label-secondary);
  cursor: pointer;
  transition:
    background-color var(--luce-motion-fast) var(--luce-ease-out),
    color var(--luce-motion-fast) var(--luce-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .luce-input-shell__clear:hover {
    background: var(--luce-color-fill-2);
    color: var(--luce-color-label-primary);
  }
}

.luce-input-shell__clear:focus-visible {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: -2px;
}
.luce-menu {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  max-width: 260px;
  padding: var(--luce-space-xs);
  border: var(--luce-stroke-hairline) solid transparent;
  border-radius: var(--luce-radius-lg);
  background: var(--luce-color-surface-floating);
  box-shadow: var(--luce-shadow-floating);
  color: var(--luce-color-label-primary);
}

.luce-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--luce-space-sm);
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: var(--luce-space-xs) var(--luce-space-sm);
  border: 0;
  border-radius: var(--luce-radius-md);
  background: transparent;
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2);
  text-align: start;
  cursor: pointer;
  transition:
    background-color var(--luce-motion-fast) var(--luce-ease-out),
    color var(--luce-motion-fast) var(--luce-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .luce-menu__item:hover:not(:disabled) {
    background: var(--luce-color-fill-1);
  }

  .luce-menu__item--danger:hover:not(:disabled) {
    background: var(--luce-color-danger-10);
  }
}

.luce-menu__item:focus-visible {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: -2px;
}

.luce-menu__item:disabled {
  color: var(--luce-color-label-quaternary);
  cursor: not-allowed;
}

.luce-menu__item--danger:not(:disabled) {
  color: var(--luce-color-danger);
}

.luce-menu__lead {
  display: inline-flex;
  align-items: center;
  gap: var(--luce-space-sm);
  min-width: 0;
}

.luce-menu__icon,
.luce-menu__check {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: currentColor;
}

.luce-menu__icon > svg,
.luce-menu__check > svg {
  width: 100%;
  height: 100%;
}

.luce-menu__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luce-menu__separator {
  height: var(--luce-stroke-hairline);
  margin: var(--luce-space-xs) var(--luce-space-sm);
  background: var(--luce-color-separator);
}

/* MenuButton: the menu is a top-layer popover anchored under the trigger's
   end edge (above it near the bottom of the window). It opens from the
   trigger's corner with a short scale and fades out faster than it came. */
.luce-menu-button {
  display: inline-flex;
  anchor-scope: --luce-menu-trigger;
}

.luce-menu-button__trigger {
  anchor-name: --luce-menu-trigger;
}

.luce-menu-button__popover {
  position-anchor: --luce-menu-trigger;
  position-area: block-end span-inline-start;
  position-try-fallbacks: flip-block;
  container-type: anchored;
  inset: auto;
  margin: var(--luce-space-xs) 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--luce-color-label-primary);
  opacity: 0;
  transition:
    opacity var(--luce-motion-fast) var(--luce-ease-out),
    display var(--luce-motion-fast) allow-discrete,
    overlay var(--luce-motion-fast) allow-discrete;
}

.luce-menu-button__popover:popover-open {
  opacity: 1;
}

@starting-style {
  .luce-menu-button__popover:popover-open {
    opacity: 0;
  }
}

.luce-menu-button__popover > .luce-menu {
  transform-origin: top right;
  scale: 0.97;
  transition: scale var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-menu-button__popover:popover-open > .luce-menu {
  scale: 1;
  transition: scale var(--luce-motion-spring) var(--luce-ease-spring);
}

@starting-style {
  .luce-menu-button__popover:popover-open > .luce-menu {
    scale: 0.97;
  }
}

@container anchored(fallback: flip-block) {
  .luce-menu-button__popover > .luce-menu {
    transform-origin: bottom right;
  }
}
.luce-nav-list {
  display: flex;
  gap: 2px;
  min-width: 0;
}

.luce-nav-list--vertical {
  flex-direction: column;
}

.luce-nav-list--horizontal {
  flex-direction: row;
  overflow-x: auto;
  scrollbar-width: none;
}

.luce-nav-list--horizontal::-webkit-scrollbar {
  display: none;
}

.luce-nav-list__group {
  display: flex;
  flex-direction: inherit;
  gap: inherit;
  min-width: 0;
}

/* A group label sits closer to its own items than to the group above. */
.luce-nav-list--vertical .luce-nav-list__group + .luce-nav-list__group {
  margin-top: var(--luce-space-lg);
}

/* With end groups, a vertical list fills its parent's height (the parent
   gives it one): the start groups scroll in their own region and the end
   groups stay below it. Nothing scrolls beneath them; a hairline marks the
   seam while the region holds more than it shows. The consumer pads both
   regions so focus rings are not clipped. */
.luce-nav-list--has-end {
  min-height: 0;
  timeline-scope: --luce-nav-list-scroll;
}

.luce-nav-list__scroll,
.luce-nav-list__end {
  display: flex;
  flex-direction: inherit;
  gap: inherit;
  min-width: 0;
}

.luce-nav-list--vertical .luce-nav-list__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-timeline: --luce-nav-list-scroll block;
}

.luce-nav-list--vertical .luce-nav-list__end {
  flex: none;
  border-top: var(--luce-stroke-hairline) solid transparent;
  animation: luce-nav-list-end-seam linear both;
  animation-timeline: --luce-nav-list-scroll;
  animation-range: calc(100% - var(--luce-space-md)) 100%;
}

@keyframes luce-nav-list-end-seam {
  from {
    border-top-color: var(--luce-color-separator);
  }

  to {
    border-top-color: transparent;
  }
}

.luce-nav-list__group-label {
  padding: 0 var(--luce-space-md) var(--luce-space-xs);
  color: var(--luce-color-label-secondary);
  font: var(--luce-text-c1);
}

.luce-nav-list--horizontal .luce-nav-list__group-label {
  display: none;
}

.luce-nav-list__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--luce-space-sm);
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: var(--luce-space-xs) var(--luce-space-md);
  border: 0;
  border-radius: var(--luce-radius-md);
  background: transparent;
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2);
  text-align: left;
  cursor: pointer;
  transition:
    background-color var(--luce-motion-fast) var(--luce-ease-out),
    color var(--luce-motion-fast) var(--luce-ease-out),
    transform var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-nav-list--horizontal .luce-nav-list__item {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .luce-nav-list__item:hover:not(:disabled):not([aria-current="page"]) {
    background: var(--luce-color-fill-1);
  }
}

/* The selected item: a surface step and a short accent bar that springs in
   at its leading edge. */
.luce-nav-list__item[aria-current="page"] {
  background: var(--luce-color-fill-2);
}

.luce-nav-list--vertical .luce-nav-list__item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 16px;
  margin-top: -8px;
  border-radius: var(--luce-radius-full);
  background: var(--luce-color-accent);
  opacity: 0;
  transform: scaleY(0);
  transition:
    opacity var(--luce-motion-fast) var(--luce-ease-out),
    transform var(--luce-motion-spring-bounce) var(--luce-ease-spring-bounce);
}

.luce-nav-list--vertical .luce-nav-list__item[aria-current="page"]::before {
  opacity: 1;
  transform: scaleY(1);
}

.luce-nav-list__item:active:not(:disabled) {
  transform: scale(var(--luce-press-scale));
}

.luce-nav-list__item:disabled {
  cursor: not-allowed;
  color: var(--luce-color-label-quaternary);
}

.luce-nav-list__item:focus-visible {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: 2px;
}

.luce-nav-list__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--luce-color-label-secondary);
  transition: color var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-nav-list__item[aria-current="page"] .luce-nav-list__icon {
  color: var(--luce-color-accent);
}

.luce-nav-list__item:disabled .luce-nav-list__icon {
  color: var(--luce-color-label-quaternary);
}

.luce-nav-list__icon > svg {
  width: 100%;
  height: 100%;
}

.luce-nav-list__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.luce-nav-list__label {
  min-width: 0;
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luce-nav-list__item:disabled .luce-nav-list__label {
  color: var(--luce-color-label-quaternary);
}

.luce-nav-list__summary {
  min-width: 0;
  color: var(--luce-color-label-secondary);
  font: var(--luce-text-c1);
  overflow: hidden;
  text-overflow: ellipsis;
}
.luce-select-field {
  min-width: 0;
  anchor-scope: --luce-select-trigger;
}

.luce-select__control {
  position: relative;
  display: block;
  width: 100%;
  color: var(--luce-color-label-primary);
}

.luce-select {
  anchor-name: --luce-select-trigger;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--luce-space-sm);
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px 0 12px;
  border: var(--luce-stroke-hairline) solid var(--luce-color-fill-1);
  border-radius: var(--luce-radius-lg);
  background: var(--luce-color-fill-1);
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2);
  text-align: left;
  cursor: pointer;
  transition:
    background-color var(--luce-motion-fast) var(--luce-ease-out),
    border-color var(--luce-motion-fast) var(--luce-ease-out),
    box-shadow var(--luce-motion-fast) var(--luce-ease-out),
    color var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-select__value {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luce-select__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--luce-color-label-tertiary);
  transition:
    color var(--luce-motion-fast) var(--luce-ease-out),
    transform var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-select__icon > svg {
  width: 100%;
  height: 100%;
}

.luce-select--empty {
  color: var(--luce-color-label-tertiary);
}

@media (hover: hover) and (pointer: fine) {
  .luce-select:hover:not(:disabled) {
    background: var(--luce-color-fill-2);
    border-color: var(--luce-color-fill-2);
  }
}

.luce-select--open {
  background: var(--luce-color-fill-1);
  border-color: var(--luce-color-fill-1);
}

.luce-select:focus-visible {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: 2px;
}

.luce-select--open .luce-select__icon {
  color: var(--luce-color-label-primary);
  transform: rotate(180deg);
}

.luce-select:disabled {
  background: var(--luce-color-fill-1);
  color: var(--luce-color-label-quaternary);
  cursor: not-allowed;
}

.luce-select:disabled .luce-select__icon {
  color: var(--luce-color-label-quaternary);
}

.luce-select--error {
  border-color: var(--luce-color-danger);
}

.luce-select--error:focus-visible {
  outline-color: var(--luce-color-danger);
}

/* A top-layer popover anchored under its trigger: the browser tracks the
 * trigger through scrolling and resizing, flips the list above it when it does
 * not fit below, and light-dismisses it. The margins keep the 4px trigger gap
 * and the 8px viewport edge inside the space a placement must fit; the list
 * shrinks to that space until it reaches the flip height, which is capped so
 * that one side of the trigger always qualifies. */
.luce-select__popover {
  --luce-select-gap: 4px;
  --luce-select-edge: 8px;
  --luce-select-flip-height: min(
    180px,
    calc(50dvh - anchor-size(height) / 2 - var(--luce-select-gap) - var(--luce-select-edge))
  );
  position-anchor: --luce-select-trigger;
  position-area: block-end span-inline-end;
  position-try-fallbacks: flip-block;
  container-type: anchored;
  box-sizing: border-box;
  width: anchor-size(width);
  max-width: calc(100vw - 2 * var(--luce-select-edge));
  max-height: min(
    280px,
    max(
      var(--luce-select-flip-height),
      calc(100% - var(--luce-select-gap) - var(--luce-select-edge))
    )
  );
  inset: auto;
  margin: var(--luce-select-gap) 0 var(--luce-select-edge);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--luce-color-label-primary);
}

.luce-select__popover:popover-open {
  display: flex;
  flex-direction: column;
}

.luce-select__listbox {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: var(--luce-space-sm);
  overflow-y: auto;
  border: var(--luce-stroke-hairline) solid var(--luce-color-separator);
  border-radius: var(--luce-radius-lg);
  background: var(--luce-color-surface-floating);
  box-shadow: var(--luce-shadow-floating);
  color: var(--luce-color-label-primary);
  list-style: none;
  transform-origin: top;
  transition:
    opacity var(--luce-motion-medium) var(--luce-ease-out),
    transform var(--luce-motion-medium) var(--luce-ease-out);
}

@starting-style {
  .luce-select__listbox {
    opacity: 0;
    transform: scale(0.97);
  }
}

@container anchored(fallback: flip-block) {
  .luce-select__listbox {
    transform-origin: bottom;
  }
}

.luce-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--luce-space-sm);
  min-height: 36px;
  padding: var(--luce-space-sm);
  border-radius: var(--luce-radius-md);
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2);
  cursor: pointer;
  user-select: none;
}

.luce-select__option[data-active="true"] {
  background: var(--luce-color-fill-1);
}

.luce-select__option[aria-selected="true"] {
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2-emphasized);
}

.luce-select__option[data-disabled="true"] {
  color: var(--luce-color-label-quaternary);
  cursor: not-allowed;
}

.luce-select__option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luce-select__check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--luce-color-label-primary);
}
.luce-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 2px;
  border-radius: var(--luce-radius-md);
  background: var(--luce-color-fill-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.luce-tabs::-webkit-scrollbar {
  display: none;
}

.luce-tabs--wrap {
  flex-wrap: wrap;
  overflow-x: visible;
}

.luce-tabs--sm {
  min-height: 32px;
}

.luce-tabs--md {
  min-height: 36px;
  padding: 4px;
  border-radius: var(--luce-radius-lg);
}

.luce-tabs__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 52px;
  max-width: 100%;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--luce-radius-sm);
  background: transparent;
  color: var(--luce-color-label-secondary);
  font: var(--luce-text-b2);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--luce-motion-fast) var(--luce-ease-out),
    color var(--luce-motion-fast) var(--luce-ease-out),
    transform var(--luce-motion-fast) var(--luce-ease-out);
}

.luce-tabs--md .luce-tabs__tab {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--luce-radius-md);
  font: var(--luce-text-b2-emphasized);
}

@media (hover: hover) and (pointer: fine) {
  .luce-tabs__tab:hover:not(:disabled):not([aria-selected="true"]) {
    background: var(--luce-color-fill-1);
    color: var(--luce-color-label-primary);
  }
}

.luce-tabs__tab[aria-selected="true"] {
  background: var(--luce-color-surface-raised);
  box-shadow: var(--luce-shadow-raised);
  color: var(--luce-color-label-primary);
  font: var(--luce-text-b2-emphasized);
}

.luce-tabs__tab:active:not(:disabled) {
  transform: scale(var(--luce-press-scale));
}

.luce-tabs__tab:disabled {
  cursor: not-allowed;
  color: var(--luce-color-label-quaternary);
}

.luce-tabs__tab:focus-visible {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: 2px;
}

.luce-tabs__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.luce-tabs__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--luce-radius-full);
  background: var(--luce-color-accent);
  color: var(--luce-color-on-accent);
  font: var(--luce-text-c2-emphasized);
}
/* A manual popover in the top layer; while a modal dialog is open the host
   lives inside the topmost one (ToastContainer), since a modal makes every
   node outside its subtree inert, popovers above it included. */
.luce-toast-container {
  position: fixed;
  inset: var(--luce-space-lg) auto auto 50%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
  display: flex;
  width: min(360px, calc(100vw - var(--luce-space-3xl)));
  flex-direction: column;
  align-items: center;
  gap: var(--luce-space-md);
  pointer-events: none;
  transform: translateX(-50%);
}

.luce-toast-container[popover]:not(:popover-open) {
  display: none;
}

.luce-toast-slot {
  display: flex;
  width: 100%;
  justify-content: center;
  pointer-events: none;
  transition: transform var(--luce-motion-spring) var(--luce-ease-spring);
  will-change: transform;
}

.luce-toast-slot--exiting {
  z-index: 1;
}

.luce-toast {
  box-sizing: border-box;
  display: inline-flex;
  align-items: flex-start;
  gap: var(--luce-space-sm);
  width: max-content;
  min-width: 0;
  min-height: 40px;
  max-width: 100%;
  padding: 10px var(--luce-space-md);
  border-radius: var(--luce-radius-lg);
  background: var(--luce-color-toast-background);
  box-shadow: var(--luce-shadow-overlay);
  color: var(--luce-color-always-white);
  font: var(--luce-text-b2);
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  animation: luce-toast-enter var(--luce-motion-spring) var(--luce-ease-spring) both;
  will-change: transform, opacity;
}

.luce-toast--entered {
  animation: none;
}

.luce-toast--success .luce-icon,
.luce-toast--success .luce-toast__spinner {
  color: var(--luce-color-success);
}

.luce-toast--error .luce-icon,
.luce-toast--error .luce-toast__spinner {
  color: var(--luce-color-danger);
}

.luce-toast--caution .luce-icon,
.luce-toast--caution .luce-toast__spinner {
  color: var(--luce-color-warning);
}

.luce-toast--info .luce-icon,
.luce-toast--loading .luce-toast__spinner {
  color: var(--luce-color-always-white-secondary);
}

.luce-toast__message {
  display: -webkit-box;
  min-width: 0;
  max-width: 320px;
  overflow: hidden;
  color: var(--luce-color-always-white);
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* An error waits to be read, so it may run longer before it clamps. */
.luce-toast--error .luce-toast__message {
  -webkit-line-clamp: 4;
}

.luce-toast__action {
  flex: 0 0 auto;
  margin: 0;
  padding: var(--luce-space-xs);
  border: none;
  border-radius: var(--luce-radius-xxs);
  background: transparent;
  color: var(--luce-color-accent);
  font: var(--luce-text-b2-emphasized);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .luce-toast__action:hover {
    opacity: 0.8;
  }
}

.luce-toast__dismiss {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: -2px calc(var(--luce-space-xs) * -1) -2px 0;
  padding: 0;
  border: 0;
  border-radius: var(--luce-radius-sm);
  background: transparent;
  color: var(--luce-color-always-white);
  cursor: pointer;
}

.luce-toast__dismiss:focus-visible,
.luce-toast__action:focus-visible {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: 1px;
}

.luce-toast .luce-toast__dismiss .luce-icon {
  color: currentColor;
}

.luce-toast__spinner {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: luce-toast-spin 0.8s linear infinite;
}

.luce-toast--progress {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  row-gap: 2px;
  min-width: 280px;
  padding-bottom: 20px;
}

.luce-toast--progress .luce-toast__message {
  grid-column: 2;
}

.luce-toast--progress .luce-toast__action {
  grid-row: 1 / span 2;
  grid-column: 3;
}

.luce-toast__progress-text {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--luce-color-always-white-secondary);
  font: var(--luce-text-c1);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luce-toast__progress {
  position: absolute;
  right: var(--luce-space-md);
  bottom: 9px;
  left: var(--luce-space-md);
  height: 3px;
  overflow: hidden;
  border-radius: var(--luce-radius-full);
}

.luce-toast__progress::before {
  position: absolute;
  inset: 0;
  background: var(--luce-color-always-white);
  content: "";
  opacity: 0.16;
}

.luce-toast__progress-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--luce-color-accent);
  transform-origin: left center;
  transition: transform var(--luce-motion-slow) var(--luce-ease-out);
}

.luce-toast--exiting {
  pointer-events: none;
  animation: luce-toast-exit var(--luce-motion-fast) var(--luce-ease-out) forwards;
}

@keyframes luce-toast-enter {
  from {
    opacity: 0;
    transform: translateY(calc(-100% - var(--luce-space-md))) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes luce-toast-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
}

@keyframes luce-toast-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reduced motion: the host's motion preference on <html data-reduced-motion>
   (the app setting or the OS). */
:root[data-reduced-motion="true"] .luce-toast-slot {
  transition: none;
}

:root[data-reduced-motion="true"] .luce-toast {
  animation: none;
  transition: none;
}

:root[data-reduced-motion="true"] .luce-toast--exiting {
  opacity: 0;
}

:root[data-reduced-motion="true"] .luce-toast__spinner {
  animation-duration: 0.01ms !important;
}

:root[data-reduced-motion="true"] .luce-toast__progress-fill {
  transition: none;
}

/* Read by assistive technology, never shown (ToastProvider's announce). */
.luce-toast-announcer {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Windows' switch grammar: off is an outlined track with a small thumb in the
   secondary label color, on is an accent track with a white thumb. Both
   states keep a 3:1 boundary against the surface, and the thumb grows under
   the pointer. */
.luce-toggle {
  --toggle-width: 32px;
  --toggle-height: 18px;
  --toggle-thumb: 14px;
  --toggle-thumb-x: 2px;
  --toggle-on-x: 16px;
  --toggle-thumb-scale: 0.72;

  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--luce-space-sm);
  min-height: 32px;
  cursor: pointer;
  color: var(--luce-color-label-primary);
}

.luce-toggle--lg {
  --toggle-width: 44px;
  --toggle-height: 24px;
  --toggle-thumb: 20px;
  --toggle-on-x: 22px;
}

.luce-toggle__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.luce-toggle__track {
  position: relative;
  flex-shrink: 0;
  width: var(--toggle-width);
  height: var(--toggle-height);
  border-radius: var(--luce-radius-full);
  background: transparent;
  box-shadow: inset 0 0 0 var(--luce-stroke-border) var(--luce-color-label-secondary);
  transition:
    background-color var(--luce-motion-medium) var(--luce-ease-out),
    box-shadow var(--luce-motion-medium) var(--luce-ease-out);
}

.luce-toggle__thumb {
  position: absolute;
  top: calc((var(--toggle-height) - var(--toggle-thumb)) / 2);
  left: 0;
  width: var(--toggle-thumb);
  height: var(--toggle-thumb);
  border-radius: 50%;
  background: var(--luce-color-label-secondary);
  transform: translateX(var(--toggle-thumb-x)) scale(var(--toggle-thumb-scale));
  transform-origin: center;
  transition:
    transform var(--luce-motion-spring-bounce) var(--luce-ease-spring-bounce),
    background-color var(--luce-motion-medium) var(--luce-ease-out);
}

.luce-toggle__input:checked + .luce-toggle__track {
  background: var(--luce-color-accent);
  box-shadow: inset 0 0 0 var(--luce-stroke-border) var(--luce-color-accent);
}

.luce-toggle__input:checked + .luce-toggle__track .luce-toggle__thumb {
  --toggle-thumb-x: var(--toggle-on-x);
  --toggle-thumb-scale: 1;
  background: var(--luce-color-on-accent);
  box-shadow: var(--luce-shadow-raised);
}

@media (hover: hover) and (pointer: fine) {
  .luce-toggle:hover
    .luce-toggle__input:not(:disabled):not(:checked)
    + .luce-toggle__track
    .luce-toggle__thumb {
    --toggle-thumb-scale: 0.86;
  }
}

.luce-toggle__input:focus-visible + .luce-toggle__track {
  outline: 2px solid var(--luce-color-accent);
  outline-offset: 2px;
}

.luce-toggle__input:disabled {
  cursor: not-allowed;
}

.luce-toggle__input:disabled + .luce-toggle__track {
  opacity: 0.4;
}

.luce-toggle__input:disabled ~ .luce-toggle__label {
  color: var(--luce-color-label-tertiary);
}

.luce-toggle__label {
  min-width: 0;
  overflow: hidden;
  font: var(--luce-text-b2);
  color: var(--luce-color-label-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}
:root {
  /* --------------------------------------------------------------------------
     Luce Design Tokens
     Product token namespace for the LuceDesk renderer. Values are mapped
     from the adopted source design system; product code should use luce
     token names for new work.
  -------------------------------------------------------------------------- */

  /* The stylesheet declares no theme value. The theme runtime
     (applyAppearance.ts) writes them inline on the root from the resolved
     appearance: every --luce-color-* (the base theme's palette from the
     luce.foundation plugin, the derived colors, the theme's own), the
     radii and stroke widths (shape), the shadows and frost (depth), the type
     scale (type) and the fast/medium/slow durations (timing). What follows
     is fixed structure and the aliases and shorthands composed from those. */
  --luce-color-border: var(--luce-color-separator);
  --luce-color-border-strong: var(--luce-color-separator-hover);
  --luce-color-brand-primary: var(--luce-color-label-primary);
  --luce-color-brand-primary-hover: var(--luce-color-label-primary-hover);
  --luce-color-brand-primary-active: var(--luce-color-label-primary-active);

  /* Radius: the pill radius is fixed; the rest come from shape. */
  --luce-radius-full: 9999px;

  /* Spacing */
  --luce-space-xs: 4px;
  --luce-space-sm: 8px;
  --luce-space-md: 12px;
  --luce-space-lg: 16px;
  --luce-space-xl: 20px;
  --luce-space-2xl: 24px;
  --luce-space-3xl: 32px;

  /* Typography */
  --luce-font-sans: "PingFang SC", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --luce-font-mono: "Geist Mono", "Cascadia Mono", "Consolas", monospace;
  /* Type shorthands, composed from the type aspect's sizes, line heights and
     weights. */
  --luce-text-large-title: var(--luce-font-weight-strong) var(--luce-font-size-large-title) /
    var(--luce-line-height-large-title) var(--luce-font-sans);
  --luce-text-t2: 400 var(--luce-font-size-t2) / var(--luce-line-height-t2) var(--luce-font-sans);
  --luce-text-t2-emphasized: var(--luce-font-weight-emphasized) var(--luce-font-size-t2) /
    var(--luce-line-height-t2) var(--luce-font-sans);
  --luce-text-b1: 400 var(--luce-font-size-b1) / var(--luce-line-height-b1) var(--luce-font-sans);
  --luce-text-b1-emphasized: var(--luce-font-weight-emphasized) var(--luce-font-size-b1) /
    var(--luce-line-height-b1) var(--luce-font-sans);
  --luce-text-b2: 400 var(--luce-font-size-b2) / var(--luce-line-height-b2) var(--luce-font-sans);
  --luce-text-b2-emphasized: var(--luce-font-weight-emphasized) var(--luce-font-size-b2) /
    var(--luce-line-height-b2) var(--luce-font-sans);
  --luce-text-c1: 400 var(--luce-font-size-c1) / var(--luce-line-height-c1) var(--luce-font-sans);
  --luce-text-c1-emphasized: var(--luce-font-weight-emphasized) var(--luce-font-size-c1) /
    var(--luce-line-height-c1) var(--luce-font-sans);
  --luce-text-c2: 400 var(--luce-font-size-c2) / var(--luce-line-height-c2) var(--luce-font-sans);
  --luce-text-c2-emphasized: var(--luce-font-weight-emphasized) var(--luce-font-size-c2) /
    var(--luce-line-height-c2) var(--luce-font-sans);
  --luce-markdown-h1: 400 22px/36px var(--luce-font-sans);
  --luce-markdown-h2: 400 20px/32px var(--luce-font-sans);
  --luce-markdown-h3: 400 18px/28px var(--luce-font-sans);
  --luce-markdown-body: 400 16px/26px var(--luce-font-sans);
  --luce-markdown-body-emphasized: 600 16px/26px var(--luce-font-sans);
  --luce-markdown-code-block: 400 14px/22px var(--luce-font-mono);
  --luce-markdown-inline-code: 400 16px/26px var(--luce-font-mono);

  /* Motion: fast, medium and slow come from timing; the rest is fixed. */
  --luce-motion-drawer: 320ms;
  --luce-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --luce-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --luce-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --luce-ease-standard: var(--luce-ease-out);
  /* State springs (@luce/plugin-sdk/motion): a unit spring released from
     rest over timing.slow, critically damped and with the hover feel's lift
     bounce. The theme runtime writes them when the appearance applies
     (springEasingTokens); these are its output at the defaults (260 ms, 0.35)
     for the frames before — theme/springCssParity.test.ts pins them.
     Transforms only: a colour or opacity has nothing to overshoot. */
  --luce-motion-spring: 351ms;
  --luce-ease-spring: linear(
    0,
    0.0205,
    0.0712,
    0.1395,
    0.2166,
    0.2964,
    0.3749,
    0.4497,
    0.5191,
    0.5824,
    0.6393,
    0.6899,
    0.7345,
    0.7736,
    0.8075,
    0.8368,
    0.862,
    0.8836,
    0.902,
    0.9177,
    0.9309,
    0.9422,
    0.9517,
    0.9597,
    0.9664,
    0.972,
    0.9767,
    0.9806,
    0.9839,
    0.9867,
    0.989,
    0.9909,
    0.9924,
    0.9938,
    0.9948,
    0.9957,
    0.9965,
    0.9971,
    0.9976,
    1
  );
  --luce-motion-spring-bounce: 406ms;
  --luce-ease-spring-bounce: linear(
    0,
    0.0283,
    0.1009,
    0.2015,
    0.317,
    0.4369,
    0.5536,
    0.6617,
    0.7578,
    0.8401,
    0.9081,
    0.962,
    1.0029,
    1.0323,
    1.0517,
    1.0629,
    1.0677,
    1.0674,
    1.0636,
    1.0575,
    1.05,
    1.0419,
    1.0338,
    1.0261,
    1.0192,
    1.0132,
    1.0081,
    1.0041,
    1.0009,
    0.9986,
    0.997,
    0.996,
    0.9955,
    0.9954,
    0.9955,
    0.9959,
    0.9964,
    0.9969,
    0.9975,
    1
  );
  --luce-enter-distance: 6px;
  --luce-press-scale: 0.97;
  --luce-hover-lift: -1px;

  /* Z-index layers */
  /* Dialogs, menus and toasts live in the top layer and take no z-index. */
  --luce-z-tooltip: 900;
  --luce-z-header: 500;
  --luce-z-floating: 100;
}
:root {
  /* Desktop object surfaces: the palette's card colors. */
  --sdi-luce-0: var(--luce-color-card-primary);
  --sdi-luce-1: var(--luce-color-card-secondary);
  --sdi-luce-2: var(--luce-color-card-tertiary);
  --sdi-luce-3: var(--luce-color-separator);
  --sdi-ink: var(--luce-color-label-primary);
  --sdi-ink-muted: var(--luce-color-label-secondary);
  --sdi-ink-soft: var(--luce-color-label-tertiary);
  --sdi-fill-1: var(--luce-color-fill-1);
  --sdi-fill-2: var(--luce-color-fill-2);
  --sdi-fill-3: var(--luce-color-fill-3);
  --sdi-accent: var(--luce-color-accent);
  --sdi-accent-20: var(--luce-color-accent-20);
  --sdi-danger: var(--luce-color-danger);
  --sdi-white: var(--luce-color-always-white);
  --sdi-shadow-md: var(--luce-shadow-floating, 0 5px 16px rgba(0, 0, 0, 0.118));
  --sdi-ring-accent: 0 0 0 3px var(--sdi-accent-20);
  --sdi-stroke: var(--luce-stroke-border, 1px);
  --sdi-radius-sm: var(--luce-radius-sm, 8px);
  --sdi-radius-md: var(--luce-radius-md, 10px);
  --sdi-radius-lg: var(--luce-radius-lg, 12px);
  --sdi-radius-full: var(--luce-radius-full, 9999px);
  --sdi-font-sans: var(
    --luce-font-sans,
    "PingFang SC",
    "Segoe UI Variable Text",
    "Segoe UI",
    system-ui,
    sans-serif
  );
  --sdi-text-c1: var(--luce-text-c1, 400 12px/18px var(--sdi-font-sans));
  --sdi-text-c1-emphasized: var(--luce-text-c1-emphasized, 500 12px/18px var(--sdi-font-sans));
}

/* Root surface */
[data-desktop-root] {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: none;
  isolation: isolate;
}

.sdi-gpu-scene-host {
  position: absolute;
  z-index: 1000;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  contain: layout paint size;
}

.sdi-gpu-scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.sdi-gpu-frame-rate {
  position: absolute;
  /* Hosts with their own top-right chrome move the badge down. */
  top: var(--sdi-frame-rate-top, 10px);
  right: 10px;
  z-index: 1;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 3px 8px;
  min-width: 112px;
  margin: 0;
  padding: 6px 9px;
  border: var(--sdi-stroke) solid
    color-mix(in srgb, var(--sdi-separator, rgba(255, 255, 255, 0.2)) 72%, transparent);
  border-radius: 8px;
  background: color-mix(
    in srgb,
    var(--sdi-background-primary, rgba(22, 24, 30, 0.88)) 82%,
    transparent
  );
  box-shadow: var(--luce-shadow-overlay, 0 9px 28px rgba(0, 0, 0, 0.149));
  color: var(--sdi-ink-muted, rgba(255, 255, 255, 0.72));
  font: 500 11px/1.2 var(--sdi-font-family, system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

.sdi-gpu-frame-rate dd {
  margin: 0;
}

.sdi-gpu-frame-rate [data-desktop-gpu-rendered-rate],
.sdi-gpu-frame-rate [data-desktop-gpu-effective-rate] {
  text-align: right;
  color: var(--sdi-ink, rgba(255, 255, 255, 0.96));
  font-size: 13px;
  font-weight: 650;
}

.sdi-gpu-frame-rate-pacing {
  min-width: 9ch;
}

.sdi-gpu-performance-diagnostics {
  position: fixed;
  top: 52px;
  right: 10px;
  z-index: 10000;
  width: min(430px, calc(100% - 20px));
  padding: 10px;
  border: var(--sdi-stroke) solid
    color-mix(in srgb, var(--sdi-separator, rgba(255, 255, 255, 0.2)) 72%, transparent);
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--sdi-background-primary, rgba(22, 24, 30, 0.94)) 90%,
    transparent
  );
  box-shadow: var(--luce-shadow-overlay, 0 9px 28px rgba(0, 0, 0, 0.149));
  color: var(--sdi-ink-muted, rgba(255, 255, 255, 0.72));
  font: 500 11px/1.35 var(--sdi-font-family, system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(14px);
  pointer-events: auto;
  user-select: text;
}

.sdi-gpu-performance-diagnostics header,
.sdi-gpu-performance-diagnostics dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sdi-gpu-performance-diagnostics header {
  align-items: center;
  padding-bottom: 7px;
  border-bottom: var(--sdi-stroke) solid color-mix(in srgb, currentColor 18%, transparent);
  color: var(--sdi-ink, rgba(255, 255, 255, 0.96));
  font-weight: 650;
}

.sdi-gpu-performance-diagnostics header strong {
  color: var(--sdi-luce-3, #8ec5ff);
  font-size: 11px;
}

.sdi-gpu-performance-diagnostics dl {
  display: grid;
  gap: 5px;
  margin: 8px 0;
}

.sdi-gpu-performance-diagnostics dt {
  flex: 0 0 auto;
}

.sdi-gpu-performance-diagnostics dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--sdi-ink, rgba(255, 255, 255, 0.96));
  text-align: right;
}

.sdi-gpu-performance-diagnostics button {
  width: 100%;
  min-height: 28px;
  border: var(--sdi-stroke) solid color-mix(in srgb, var(--sdi-luce-3, #8ec5ff) 48%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--sdi-luce-3, #8ec5ff) 13%, transparent);
  color: var(--sdi-ink, rgba(255, 255, 255, 0.96));
  font: inherit;
  cursor: pointer;
  user-select: none;
}

.sdi-gpu-performance-diagnostics button:hover {
  background: color-mix(in srgb, var(--sdi-luce-3, #8ec5ff) 22%, transparent);
}

.sdi-gpu-semantics {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Native drag image clone: parked offscreen in document.body. Chromium
 * captures the drag bitmap during dragstart; the clone is removed on the next
 * tick. */
[data-desktop-drag-image-clone] {
  position: fixed;
  left: -100000px;
  top: 0;
  margin: 0;
  z-index: -1;
  pointer-events: none;
}

[data-desktop-drag-image-clone],
[data-desktop-drag-image-clone] * {
  transition: none !important;
  animation: none !important;
}

/* GPU canvas interaction entry (gpu-ready): the canvas owns pointer and drag
 * events. */
[data-desktop-root]:has(.sdi-gpu-scene-canvas[data-desktop-gpu-ready="true"])
  .sdi-gpu-scene-canvas {
  pointer-events: auto;
}

[data-desktop-root][data-desktop-drag-active="true"] {
  user-select: none;
}

/* Embedded browsing contexts otherwise form an input island during a drag.
   Disable only for the active session so normal widget interaction is intact. */
[data-desktop-root][data-desktop-drag-active="true"] iframe {
  pointer-events: none !important;
}
.luce-vendor-root {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--luce-color-background-ground);
}

.luce-vendor-failure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  height: 100%;
  padding: 32px;
  color: var(--luce-color-label-secondary);
  background: var(--luce-color-background-ground);
  text-align: center;
}

.luce-vendor-failure p {
  max-width: 360px;
  margin: 0;
  line-height: 1.7;
}
/*$vite$:1*/