﻿@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sidebar-width: 220px;
  --sidebar-min-width: 90px;
  --sidebar-max-width: 420px;
  --color-panel-bg: #1d1d1d;

  --color-sidebar: #232323;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.12);
  --color-border-soft: rgba(255, 255, 255, 0.04);

  --color-text-primary: #f1f5ff;
  --color-text-secondary: #a0a0a0;
  --color-text-muted: #8d8d8d;
  --color-text-invert: #0a1020;

  --color-danger: #ff4b55;
  --preview-group-color: #3e7dd1;

  --transition-fast: 0.06s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.10s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.12s cubic-bezier(0.1, 0.6, 0.7, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background: var(--color-panel-bg);
}

body {
  margin: 0;
  color: var(--color-text-primary);
  font-family: "Inter";
  font-size: 11px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: stretch;
  overflow-x: hidden;
}

#root {
  width: 100%;
  height: 100%;
  background: var(--color-panel-bg);
}

button,
input {
  font: inherit;
  color: inherit;
}

/* button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
} */

/* CEP workaround: keep pointer on clickable descendants */
/* button:not(:disabled),
button:not(:disabled) * {
  cursor: pointer;
} */

/* .tree__gif,
.tree__gif * {
  cursor: pointer;
} */

.panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  position: relative;
  background: var(--color-panel-bg);
}

.panel__workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  width: 100%;
  background: var(--color-panel-bg);
}

.panel__footer {
  display: grid;
  width: 100%;
  gap: 0;
  background: var(--color-panel-bg);
/*   backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); */
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  /* border-top: 1px solid var(--color-border-soft); */
  user-select: none;
  -webkit-user-select: none;
}

/* An open footer menu (Copy/Paste/Delete, Split, More) goes up over the preview grid: above its
   zoom control (.preview-zoom-controls, z-index 80). */
.panel__footer:has(.footer-menu:not(.hidden):not(.footer-menu--inline), .footer-overflow-popup.is-open) {
  z-index: 81;
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-min-width);
  max-width: var(--sidebar-max-width);
  flex-shrink: 0;
  background: var(--color-sidebar);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  contain: layout style paint;
}

.sidebar__header {
    padding: 8px 8px;
    border-bottom: 1px solid #2A2A2A;
    background: rgb(35 35 35);
    position: sticky;
    top: 0;
    z-index: 3;
}

.sidebar__search-wrapper {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

/* The search (the button that puts the sidebar away is before the content's tabs, ContentHeader). */
.sidebar__header {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* The sidebar put away (store sidebarCollapsed): the content takes the whole width. */
.panel__workspace[data-sidebar-collapsed] > .sidebar,
.panel__workspace[data-sidebar-collapsed] > .panel__divider {
  display: none;
}

/* Its hide / show button (ContentHeader, before the Presets / Edit / Tools tabs, whether the sidebar is out
   or away), in the footer's button style: a thin gray outline, lighter on hover; a square with rounded
   corners, as tall as the tabs' buttons (.content-tabs__tab). */
.sidebar-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0.3px solid #646464a8;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: #878787;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  border-color: #AEAEAE;
  background: rgba(255, 255, 255, 0.07);
  color: #AEAEAE;
  outline: none;
}

.sidebar-toggle__icon {
  width: 14px;
  height: 14px;
  display: block;
}

.content__header-start {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sidebar__search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--color-text-secondary);
  pointer-events: none;
  opacity: 0.9;
}

.sidebar__search-wrapper:focus-within .sidebar__search-icon {
  color: var(--color-text-primary);
  opacity: 1;
}

.sidebar__search {
  width: 100%;
  height: 30px;
  line-height: 30px;
  padding: 0 6px 0 36px;
  border-radius: 99px;
  border: 0.3px solid #64646469;
  background:  #191919a1;
  color: var(--color-text-primary);
  font-size: 12px;
  font-weight: 400;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.sidebar__search::placeholder {
  color: var(--color-text-muted);
  position: relative;
  top: 1px;
}

.sidebar__search:hover:not(:focus)::placeholder {
  color: var(--color-text-primary);
}

.sidebar__search:focus {
  outline: none;
  border-color: rgb(48 48 48);
  background: rgb(22 22 22 / 84%);
}

.sidebar__search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  margin-left: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath stroke='%23b6b6b6' stroke-width='1.6' stroke-linecap='round' d='M3 3l8 8M11 3L3 11'/%3E%3C/svg%3E") center center no-repeat;
  background-size: 12px 12px;
  /* cursor: pointer; */
  opacity: 0.8;
}

.sidebar__search::-webkit-search-cancel-button:hover {
  opacity: 1;
}

.sidebar__search::-ms-clear {
  display: none;
}

.panel__divider {
  min-width: 6px;
  background: #0F0F0F;
  border: none;
  cursor: col-resize;
  position: relative;
  z-index: 1;
  transition: background var(--transition-fast);
}

.panel__divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 -7px 0 rgba(255, 255, 255, 0.28),
    0 7px 0 rgba(255, 255, 255, 0.28);
}

.panel__divider:hover,
body.is-resizing .panel__divider {
  background: rgb(48 48 48);
}

.tree {
  --tree-left-pad: 5px;
  flex: 1;
  padding-bottom: calc(var(--folder-tree-bottom-pad, 59px) + var(--ai-window-height, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  contain: layout style paint;
  /* padding: 6px 6px 24px; */
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.tree::-webkit-scrollbar {
  width: 4px;
}

.tree::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.tree::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.tree::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.55);
}

.tree__node {
  display: block;
  padding-left: 0;
}

.tree__folder {
  display: grid;
  /* caret, icon, name (a folder's preset count no longer shows) */
  grid-template-columns: 14px 23px 1fr;
  align-items: center;
  gap: 2px;
  border-top: 0.5px solid #000000;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--color-text-secondary);
  /* transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast); */
  position: relative;
  width: 100%;
  height: 23px;
  padding-left: var(--tree-folder-indent, 0px);
  /* padding-right: 10px; */
  /* cursor: pointer; */
  /* A double click opens the folder (TreeFolder.jsx): it must not select the name's text as well. */
  user-select: none;
  -webkit-user-select: none;
}

.tree__folder--no-caret {
  grid-template-columns: 23px 1fr auto;
}

.tree__folder-caret {
  width: 19px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #878787;
  transition: transform var(--transition-fast), color var(--transition-fast);
  transform: rotate(0deg);
}

.tree__folder[aria-expanded="true"] .tree__folder-caret {
  transform: rotate(90deg);
}

.tree__folder-caret svg {
  width: 6px;
  height: 6px;
  display: block;
}

.tree__folder-caret path {
  transition: stroke var(--transition-fast);
}

.tree__folder--no-top {
  border-top: 0;
}

.tree__folder--edge-bottom {
  border-bottom: 1px solid #121212;
}

.tree__edge-bottom {
  border-bottom: 0.5px solid #121212;
}

.tree__folder:hover {
    /* background: rgb(113 113 114 / 12%); */
    color: var(--color-text-primary);
    /* border-color: rgb(138 138 138 / 30%); */
}

.tree__folder:hover .tree__folder-icon path:not(.media-icon-secondary) {
  fill: var(--color-text-primary);
}

.tree__folder:hover .tree__folder-caret path,
.tree__folder.is-selected .tree__folder-caret path {
  stroke: var(--color-text-primary);
}

.tree__folder.is-selected {
    /* background: #9d9e9e2e; */
    background: #323232;
    color: var(--color-text-primary);
  }

.tree__folder-icon {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  position: relative;
}

.tree__folder-icon svg {
  width: 13px;
  height: 13px;
}

.tree__folder-icon path:not(.media-icon-secondary) {
  fill: var(--color-text-muted);
  transition: fill var(--transition-fast);
}

.tree__folder.is-selected .tree__folder-icon path:not(.media-icon-secondary) {
  fill: var(--color-text-primary);
}

.tree__folder-icon--favorites path,
.tree__folder.is-selected .tree__folder-icon--favorites path {
  fill: #ffd761 !important;
}

.tree__folder-name {
  font-weight: 400;
  font-size: 11px;
  /* line-height: 30px; */
  position: relative;
  top: 1px;
  /* letter-spacing: 0.02em; */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.tree__children {
  overflow: hidden;
  max-height: 0;
  /* padding-left: 6px; */
  transition: opacity var(--transition-medium);
  opacity: 0;
}

.tree__children.is-expanded {
  max-height: 100000px;
/*   padding-top: 6px;
  padding-bottom: 6px; */
  opacity: 1;
}

.tree__gif-group {
  margin-left: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  /* gap: 2px; */
}

.tree__gif {
  outline: none;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  padding: 0 10px 0 calc(8px + var(--tree-left-pad) + var(--tree-gif-indent, 0px));
/*   border-bottom-left-radius: 4px;
  border-top-left-radius: 4px; */
  /* border-radius: 6px; */
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.02em;
  /* cursor: pointer; */
  position: relative;
  width: 100%;
  height: 23px;
  align-items: center;
  border-top: 0.5px solid #000000;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
    user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

.tree__gif * {
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

.tree__gif--no-top {
  border-top: 0;
}
.tree__gif-dot {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  align-self: center;
  justify-self: center;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* The icon's SVG has a viewBox and no size: Chromium (Windows) fits it to this box, WebKit (the panel on macOS)
   gave it no width in the flex box and the icon wasn't there. Sized to the box for both. */
.tree__gif-dot:not(.tree__gif-dot--favorite) svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tree__gif-dot--favorite {
  width: 21px;
  height: 19px;
  background: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tree__gif-dot--favorite svg {
  width: 10px;
  height: 10px;
  display: block;
}

.tree__gif:hover .tree__gif-dot--favorite,
.tree__gif.is-selected .tree__gif-dot--favorite {
  background: none;
}

.tree__gif:hover .tree__gif-dot--favorite svg,
.tree__gif.is-selected .tree__gif-dot--favorite svg {
  fill: #ffd761;
}

.tree__gif-name {
  height: 15px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree__gif:hover,
.tree__gif:focus-visible {
  outline: none;
  /* background: rgba(255, 255, 255, 0.06); */
  color: var(--color-text-primary);
}

.tree__gif.is-selected {
  background: #323232;
  color: var(--color-text-primary);
}

.tree__gif.is-selected .tree__gif-dot--favorite {
  background: none;
  border-radius: 0;
}

.tree__gif.is-selected .tree__gif-dot--favorite svg {
  fill: #fed75a;
}

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-panel-bg);
  position: relative;
}

.content__header {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px 6px;
/*   backdrop-filter: blur(26px); */
  position: sticky;
  top: 0;
  z-index: 5;
}

.breadcrumb {
  font-size: 13px;
  user-select: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  top: 1px;
/*   font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase; */
  color: var(--color-text-secondary);
}

/* A status line in the sidebar's tree (loading / failed). The panel's messages are .status-toast. */
.status-message {
  font-size: 9px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(260px, 45%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 5px;
  /* Just the text, in its colour: no outline, no background. */
  border: 0;
  background: none;
  color: var(--color-text-primary);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.status-message.is-success {
  color: #7effc9;
}

.status-message.is-error {
  color: #ffb3b8;
}

.status-message.is-loading {
  color: #c9e6ff;
  position: relative;
  padding-left: 20px;
}

.status-message.is-loading::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  border: 2px solid rgba(201, 230, 255, 0.7);
  border-top-color: transparent;
  animation: status-spin 0.8s linear infinite;
}

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

/* The panel's messages (StatusToast, in <body>): a note in the bottom-left corner over everything, above the
   footer (its bottom set from the footer's height); an error in a dialog in the middle, over the rest, until
   its OK. */
.status-toast {
  position: fixed;
  left: 10px;
  z-index: 10000;
  max-width: min(320px, calc(100vw - 20px));
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #1b1b1b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  /* Gray, as the panel's other secondary text, whatever the note (done, working, plain): short and quiet. */
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  pointer-events: none;
  animation: status-toast-in 160ms ease-out;
}

.status-toast.is-loading {
  padding-left: 26px;
}

.status-toast.is-loading::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid rgba(160, 160, 160, 0.7);
  border-top-color: transparent;
  animation: status-spin 0.8s linear infinite;
}

@keyframes status-toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.status-error-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}

.status-error {
  width: 100%;
  max-width: 300px;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 20px 20px 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-panel-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  text-align: center;
}

/* The icon on the title's line, the two centred together. */
.status-error__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 0 8px;
}

.status-error__icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: #ff8a92;
}

.status-error__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--color-text-primary);
}

.status-error__text {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #ffb3b8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.status-error__ok {
  min-height: 34px;
  margin-top: 0;
}

/* The panel's yes / no question (ConfirmDialog): the error dialog's card with a blue question mark, the text in
   the panel's own grey and left-aligned (it can list comps), No and Yes side by side. */
.confirm-dialog {
  max-width: 340px;
}

.confirm-dialog__icon {
  color: #3a95ff;
}

.confirm-dialog__text {
  color: #c8c8c8;
  text-align: left;
}

.confirm-dialog__buttons {
  display: flex;
  gap: 8px;
}

.confirm-dialog__buttons .auth-btn {
  flex: 1 1 0;
  min-height: 34px;
  margin-top: 0;
}

.confirm-dialog__no {
  background: #2b2b2b;
  color: var(--color-text-primary);
}

.confirm-dialog__no:hover:not(:disabled) {
  background: #353535;
}

.hidden {
  display: none !important;
}

.content__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 18px;
    overflow-x: hidden;
    overflow-y: auto;
    -ms-overflow-style: none;
     
    scrollbar-width: none;
}

.content__body::-webkit-scrollbar {
    display: none;
}

.preview-grid {
  position: relative;
  flex: 1;
  /* Base clearance for the always-visible footer actions bar, plus
     whatever extra height .footer-fields-wrapper is currently taking up
     (0 when it's hidden) — set as --preview-grid-footer-extra by
     PreviewGrid.jsx from useFooterWrapperHeightSync, so the last row(s) of
     previews scroll clear of the fields/color-swatches overlay instead of
     disappearing behind it. */
  padding: 0px 0px calc(183px + var(--preview-grid-footer-extra, 0px) + var(--ai-window-height, 0px));
  display: grid;
  /* minmax(90px, ...) keeps each column (and so each .preview-card, which
     fills its column at width:100%) from shrinking past 90px — without it,
     a high column count in a narrow panel would let 1fr tracks compress
     cards into unreadably thin slivers. */
  grid-template-columns: repeat(var(--preview-col-count, 3), minmax(90px, 1fr));
  /* grid-gap: 7px; */
  justify-content: stretch;
  grid-auto-rows: auto;
  align-content: start;
}

.preview-grid-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  /* PreviewGrid keeps the top row's card in place over a new count per row or width itself; Chromium's own
     scroll anchoring moved the view as well, by its own pick of a card. */
  overflow-anchor: none;
}

.preview-grid-scroll::-webkit-scrollbar,
.update-modal__notes::-webkit-scrollbar,
.ai-reply__body::-webkit-scrollbar,
.ai-composer__box::-webkit-scrollbar {
  width: 6px;
}

.preview-grid-scroll::-webkit-scrollbar-track,
.update-modal__notes::-webkit-scrollbar-track,
.ai-reply__body::-webkit-scrollbar-track,
.ai-composer__box::-webkit-scrollbar-track {
  background: transparent;
}

.preview-grid-scroll::-webkit-scrollbar-thumb,
.update-modal__notes::-webkit-scrollbar-thumb,
.ai-reply__body::-webkit-scrollbar-thumb,
.ai-composer__box::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.24);
  background-clip: padding-box;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 40px;
}

.preview-grid-scroll::-webkit-scrollbar-thumb:hover,
.preview-grid-scroll::-webkit-scrollbar-thumb:active,
.update-modal__notes::-webkit-scrollbar-thumb:hover,
.update-modal__notes::-webkit-scrollbar-thumb:active,
.ai-reply__body::-webkit-scrollbar-thumb:hover,
.ai-reply__body::-webkit-scrollbar-thumb:active,
.ai-composer__box::-webkit-scrollbar-thumb:hover,
.ai-composer__box::-webkit-scrollbar-thumb:active {
  background-color: rgba(255, 255, 255, 0.5);
}

.preview-variants-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  overflow: visible;
  pointer-events: none;
  animation: preview-overlay-fade-in 160ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.preview-variants-overlay--settled .preview-variants-panel {
  animation: none;
}

.preview-variants-overlay__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.preview-variants-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: calc(100% - 2px);
  min-width: 160px;
  max-height: calc(100vh - 16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: #1e1e1e;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  pointer-events: auto;
  z-index: 40;
  padding: 4px 0;
  animation: preview-panel-slide-in 140ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 90ms ease, transform 90ms ease;
  will-change: opacity, transform;
}

.preview-variants-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.preview-variants-panel::-webkit-scrollbar-track {
  background: transparent;
}

.preview-variants-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.preview-variants-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.preview-variants-list {
  display: flex;
  flex-direction: column;
}

.preview-variants-list::before,
.preview-variants-list::after {
  display: none;
}

.preview-variant-item-wrap {
  position: relative;
}

.preview-variant-item-wrap + .preview-variant-item-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.preview-variant-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #b0b0b0;
  text-align: left;
  font-size: 11px;
  line-height: 1;
  padding: 6px 10px 6px 10px;
  cursor: pointer;
  outline: none;
  transition: background 0.08s ease, color 0.08s ease, padding-right 0.08s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-variant-item::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.preview-variant-item-wrap:first-child .preview-variant-item {
  border-radius: 3px 3px 0 0;
}

.preview-variant-item-wrap:last-child .preview-variant-item {
  border-radius: 0 0 3px 3px;
}

.preview-variant-item-wrap:only-child .preview-variant-item {
  border-radius: 3px;
}

.preview-variant-item--active {
  color: #e2e2e2;
}

.preview-variant-item--active::before {
  background: #ffd761;
}

.preview-variant-item-wrap:hover .preview-variant-item--active,
.preview-variant-item--active:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: #eeeeee;
}

.preview-variant-item-wrap:hover .preview-variant-item,
.preview-variant-item:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  color: #e8e8e8;
  padding-right: 52px;
}

.preview-variant-item:active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.preview-variant-item__actions {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
  z-index: 1;
}

.preview-variant-item-wrap:hover .preview-variant-item__actions {
  opacity: 1;
  pointer-events: auto;
}

.preview-variant-item__action {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 3px;
  border: 1px solid #4e4e4e;
  background: #333333;
  color: #c8c8c8;
  cursor: pointer;
  outline: none;
  transition: background 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}

.preview-variant-item__action:hover {
  background: #4a4a4a;
  border-color: #787878;
  color: #fff;
}

.preview-variant-item__action--in:hover {
  background: linear-gradient(180deg, #47596c 0%, #3a4858 100%);
  border-color: #6b8fb2;
}

.preview-variant-item__action--out:hover {
  background: linear-gradient(180deg, #4b4b4b 0%, #3f3f3f 100%);
  border-color: #767676;
}

.preview-variant-item__action:active {
  background: #2a2a2a;
  transform: translateY(0.5px);
}

@keyframes preview-overlay-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes preview-overlay-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes preview-panel-slide-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.97);
    transform-origin: top center;
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: top center;
  }
}

@keyframes preview-panel-slide-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: top center;
  }
  to {
    opacity: 0;
    transform: translateY(-3px) scale(0.98);
    transform-origin: top center;
  }
}

.preview-card {
  position: relative;
  box-sizing: border-box;
  --preview-card-border-color: #121212;
  background-color: #232323BF;
  border: 0;
  margin: 0;
  overflow: visible;
  padding: 0;
  display: grid;
  /* grid-template-columns: 1fr auto auto; */
  /* grid-template-rows: 1fr 18px; */
  /* column-gap: 7px; */
  /* row-gap: 7px; */
  /* cursor: pointer; */
  /* box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22); */
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  width: 100%;
  aspect-ratio: auto;
  min-width: 90px;
  content-visibility: auto;
  contain-intrinsic-size: 0 var(--preview-grid-row, 200px);
}

.preview-card--has-variants {
  --preview-card-border-color: #000000;
}

.preview-card:hover {
  background: #323232;
}

.preview-card--variants-open {
  background: #323232;
  z-index: 4;
  content-visibility: visible;
  contain-intrinsic-size: unset;
}

.preview-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--preview-card-border-color);
  box-shadow: inset 0 0 0 1px var(--preview-card-border-color);
  pointer-events: none;
}

.preview-card--variants-open::after {
  border-bottom-color: transparent;
  box-shadow: inset 0 1px 0 1px var(--preview-card-border-color),
    inset 1px 0 0 1px var(--preview-card-border-color),
    inset -1px 0 0 1px var(--preview-card-border-color);
}

.preview-card.is-selected {
  background-color: #3a3a3a;
  box-shadow: none;
}

.preview-card.is-selected:hover,
.preview-card.is-selected.preview-card--variants-open {
  background-color: #434343;
  box-shadow: none;
}

.preview-card.is-selected .preview-card__title .tree__gif-dot--favorite svg {
  fill: #fed75a;
}

.preview-card__thumb {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 1;
  display: block;
  width: calc(100% - 12px);
  margin: 6px 6px 0;
  height: auto;
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 0;
  -webkit-clip-path: inset(0 round 0px);
}

.preview-card__thumb--video {
  padding: 0;
  object-fit: contain;
  object-position: center;
}

/* Descriptor .json exists but its .webm preview doesn't. */
.preview-card__thumb--missing {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #141414;
  outline: 1px dashed #3a3a3a;
  outline-offset: -1px;
}

.preview-card__missing-label {
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  color: #7a7a7a;
  user-select: none;
}

.preview-card__title,
.preview-card__favorite,
.preview-card__action {
  z-index: 1;
}

.preview-card__footer {
  position: static;
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  min-width: 0;
  height: 30px;
}

.preview-card__footer-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preview-card__title {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 3px;
  min-width: 0;
  opacity: 1;
  font-size: 12px;
  color: #cececedb;
  pointer-events: auto;
  text-align: left;
}

.preview-card__title-text {
  position: relative;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  height: 14px;
  color: #d4d4d4;
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.15s ease;
}

.preview-card:hover .preview-card__title-text,
.preview-card.is-selected .preview-card__title-text,
.preview-card--variants-open .preview-card__title-text {
  color: #ffffff;
}

.preview-card__title-text::after {
  content: attr(data-placeholder);
  position: absolute;
  left: 0;
  top: -6px;
  transform: translateY(-100%);
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f0f0f0;
  font-size: 12px;
  line-height: 1.2;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.15s ease;
}

.preview-card__title-text:hover::after {
  opacity: 1;
}

.preview-card__title .tree__gif-dot {
  width: 11px;
  height: 11px;
  background: transparent;
  color: #d4d4d4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.preview-card:hover .preview-card__title .tree__gif-dot:not(.tree__gif-dot--favorite),
.preview-card.is-selected .preview-card__title .tree__gif-dot:not(.tree__gif-dot--favorite),
.preview-card--variants-open .preview-card__title .tree__gif-dot:not(.tree__gif-dot--favorite) {
  color: #ffffff;
}

/* .preview-card__title .tree__gif-dot svg {
  width: 21px;
  height: 19px;
  display: block;
} */

.preview-card__title .tree__gif-dot--favorite::before {
  content: none;
}

.preview-card:hover .preview-card__title {
  opacity: 1;
}

.preview-card__favorite {
  outline: none;
  padding: 2px;
  position: absolute;
  top: 12px;
  right: 11px;
  margin-left: 0;
  width: 17px;
  height: 17px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #8c8c8c;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* cursor: pointer; */
  transition: color 0.2s ease, transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.preview-card__favorite svg {
  width: 23px;
  height: 22px;
  display: block;
}
.preview-card__favorite svg path {
  fill: #878787;
  transform: none;
  stroke-width: 0;
  transition: fill 0.2s ease;
}

.preview-card__favorite:hover,
.preview-card__favorite:focus-visible {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: scale(1.06);
}

.preview-card__favorite:hover svg path,
.preview-card__favorite:focus-visible svg path {
  fill: #d0d0d0;
}

.preview-card__favorite.is-active {
  opacity: 1;
}

.preview-card__favorite.is-active svg path {
  fill: #fed75a;
}

.preview-card__favorite.is-active:hover svg path,
.preview-card__favorite.is-active:focus-visible svg path {
  fill: #ffe17f;
}

.preview-card__action--in {
  left: auto;
  border-color: #5a5a5a;
  background: #3a3a3a;
  color: #d4e6fb;
  padding-left: 8px;
}

.preview-card__action--out {
  right: auto;
  border-color: #5a5a5a;
  background: #3a3a3a;
  color: #e3e3e3;
  padding-left: 8px;
}

.preview-card__action--in::before,
.preview-card__action--out::before {
  display: inline-block;
  margin-right: 4px;
  font-size: 10px;
  line-height: 1;
  opacity: 0.9;
}

.preview-card__action--in::before {
  content: "→";
}

.preview-card__action--out::before {
  content: "←";
}

.preview-card__action:hover {
  background: #464646;
  border-color: #6e6e6e;
  color: #fff;
  box-shadow: none;
}

.preview-card__action--in:hover {
  background: linear-gradient(180deg, #47596c 0%, #3a4858 100%);
  border-color: #6b8fb2;
}

.preview-card__action--out:hover {
  background: linear-gradient(180deg, #4b4b4b 0%, #3f3f3f 100%);
  border-color: #767676;
}

.preview-card__action:active {
  transform: translateY(1px);
  box-shadow: none;
}

.preview-card:hover .preview-card__action {
  opacity: 1;
  pointer-events: auto;
}

/* The selected card's buttons work without hover too: in the Mac panel WebKit sends no hover while AE's
   window isn't key, and the buttons stayed hidden. */
.preview-card.is-selected .preview-card__action {
  opacity: 1;
  pointer-events: auto;
}

/* Variant 6: AE neutral flat buttons (same palette for In/Out) */
.preview-card__action::before,
.preview-card__action--in::before,
.preview-card__action--out::before {
  content: none !important;
  display: none !important;
}

.preview-card__action {
  gap: 0;
  outline: none;
  position: static;
  min-width: 22px;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #5a5a5a;
  background: #3b3b3b;
  color: #d8d8d8;
  font-size: 10px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease,
    opacity 0.14s ease, transform 0.14s ease;
}

.preview-card__action-label {
  display: none;
}

.preview-card__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  color: #cfcfcf;
}

.preview-card__action-icon svg {
  width: 11px;
  height: 11px;
  display: block;
}

.preview-card__action:hover {
  background: #4a4a4a;
  border-color: #787878;
}

.preview-card__action:hover .preview-card__action-label {
  color: #fff;
}

.preview-card__action:hover .preview-card__action-icon {
  color: #fff;
}

.preview-card__action:active {
  background: #323232;
  border-color: #5d5d5d;
  transform: translateY(0.5px);
}

.preview-card__action--effect {
  width: auto;
  min-width: 46px;
  padding: 0 8px;
}

.preview-card__action--effect .preview-card__action-label {
  display: inline;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #d8d8d8;
}

.preview-card__action--effect:hover .preview-card__action-label {
  color: #fff;
}

/* .preview-card__action svg {
  width: 12px;
  height: 12px;
  display: block;
} */

.empty-state {
  padding: 9px;
  color: var(--color-text-secondary);
  text-align: center;
  letter-spacing: 0.04em;
}

.footer-fields-wrapper {
    --footer-control-height: 25px;
    --footer-control-static-height: 25px;
    display: flex;
    flex-direction: column;
    border-top: 2px solid #000000;
    border-bottom: 1px solid #000000;
    background-color: #222222;
    padding: 0px;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

/* The original footer-fields-wrapper row (labels + In/Out effect columns),
   pulled out into its own element so FooterColors can sit below it as a
   second row inside the same popup box instead of a fourth cramped column. */
.footer-fields-row {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    flex-wrap: nowrap;
}

.footer-fields-wrapper::before {
  content: none;
  display: none;
}

.footer-fields-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: 0 1px 0 #313131 inset,
              0 -1px 0 #313131 inset;
  z-index: 1;
}

.footer-fields {
  padding: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #313131;
}

/* Width of the label column, in one place: the two-column layout uses it for
   the whole .footer-fields--labels column, the single-effect layout for the
   per-row label inside each .control-group, and the swatch strip's own cell
   inherits it through .footer-fields--labels. All three dividers therefore
   land on the same x, including under the @media rule that widens it. */
.footer-fields-wrapper {
  --footer-label-column: 90px;
}

.footer-fields--labels {
  flex: 0 1 var(--footer-label-column);
}

.footer-fields--effect {
    flex: 1 1 140px;
    min-width: 0;
  }

/* An In / Out column the layer doesn't have, shown because the other one is there (useFooterFieldSync:
   the two always show as a pair): empty rows, titled just "In>" / "<Out" (muted, nothing to find in the
   tree), no mirror / marker buttons. */
.footer-fields--effect[data-empty] .footer-fields__mirror,
.footer-fields--effect[data-empty] .footer-fields__marker,
.footer-fields--effect[data-empty] .footer-fields__kind {
  visibility: hidden;
}

.footer-fields--effect[data-empty] .footer-fields__title-text {
  pointer-events: none;
}

.footer-fields--effect[data-empty] .footer-fields__title-label {
  color: var(--color-text-muted);
}

.footer-fields-wrapper--single .footer-fields--labels {
    display: none;
  }

.footer-fields-wrapper--single .footer-fields--effect {
    --footer-compact-width: 200px;
    flex: 1 1 auto;
    border-right: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(var(--footer-compact-width), 100%), 1fr));
    grid-auto-flow: dense;
    align-items: flex-start;
    padding: 1px;
    width: 100%;
    min-width: 0;
  }

.footer-fields-wrapper--single .footer-fields--effect .footer-fields__title {
    width: 100%;
    text-align: left;
    grid-column: 1 / -1;
  }

.footer-fields-wrapper--single .footer-fields--effect .control-group {
    /* Same row height as the two-column layout, and no vertical padding: the
       label's border-right is this layout's column divider, drawn per row, so
       any gap above or below it breaks the line into stubs instead of the
       single continuous rule .footer-fields draws in the other layout.
       No left padding either — the label is the row's first column and has to
       start at the cell edge, or its divider would sit 4px off the swatch
       strip's one. That 4px lives on the label's own inner padding. */
    height: var(--footer-control-height, 25px);
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    /* 10px, as .control-group itself is in the two-column layout — the label
       (11px) and the inputs (12px) set their own size, so this only governs
       stray inline text, but leaving it at 11px made the two layouts differ
       in a way that would eventually show up in something. */
    font-size: 10px;
  }

.footer-fields-wrapper--single .footer-fields--effect .control-group--static {
    grid-column: 1 / -1;
  }

.control-group--compact {
    gap: 0;
    height: auto;
    padding: 0;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    font-size: 10px;
    overflow: hidden;
  }

/* The single-effect layout used to run each caption inline and left-aligned,
   with no divider anywhere. It now carries the same label column the
   two-column layout has — same width, same centering, same divider — so the
   two layouts read identically and the swatch strip's cell lines up with the
   rows above it in both. */
.footer-fields-wrapper--single .footer-fields--effect .control-group__label {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    flex: 0 0 var(--footer-label-column);
    width: var(--footer-label-column);
    min-width: 0;
    padding: 0 6px;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid #313131;
  }

.control-group--compact .control-group__label {
    display: inline-flex;
    width: auto;
    justify-content: flex-start;
  }

.footer-fields-wrapper--single .footer-fields--effect .control-group__reset {
    margin-left: 8px;
  }

.control-group--compact .control-group__reset {
    margin-left: 8px;
  }

.footer-fields-wrapper--single.footer-fields-wrapper--no-lines .footer-fields--effect {
  display: flex;
  flex-direction: row;
  /* No inset frame: .footer-fields--effect's 1px padding showed as a line of
     the wrapper's own #222222 between the last row and the swatch strip —
     a horizontal rule in a different colour from every other one — and it
     pushed the rows 1px right of the strip's label cell, so the two column
     dividers missed each other by exactly that pixel. */
  padding: 0;
  /* Wraps so the effect-name bar below can claim a full-width line of its own
     above the property rows, the way ">In Effect" heads its column in the
     two-column layout. */
  flex-wrap: wrap;
  align-items: stretch;
}

/* The single-effect layout used to drop the effect's name entirely. It now
   keeps it as a full-width bar on its own ground, so this layout says which
   effect is being edited just like the two-column one does — but tinted
   rather than sharing the rows' background, since it heads the rows instead
   of being one of them. */
/* Header line of the single-effect layout: the "Property" cell and the effect
   name sit side by side on the first wrap line, exactly as they do in the
   two-column layout's header — same ground, same colours, same divider. Only
   the border-bottom is added, since here the rows below are separated by grid
   gaps rather than their own border-top. */
.footer-fields__property {
  display: none;
}

.footer-fields-wrapper--single.footer-fields-wrapper--no-lines .footer-fields--effect .footer-fields__property {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--footer-label-column);
  font-size: 11px;
  color: #CCCCCC;
  padding: 4px 6px;
  border-right: 1px solid #313131;
  border-bottom: 1px solid #313131;
}

.footer-fields-wrapper--single.footer-fields-wrapper--no-lines .footer-fields--effect .footer-fields__title {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  border-bottom: 1px solid #313131;
}

/* Column count is set inline by applyFooterCompactLayout (useFooterFieldSync,
   re-run on every panel resize) as the largest divisor of the visible group
   count that still fits FOOTER_COMPACT_GROUP_MIN_WIDTH — e.g. 4 groups show
   4-in-a-row while there's room, then step down to 2 (paired), then 1
   (stacked) as the panel narrows. Only ever divides evenly, so a group is
   never left wrapping alone while others stay on the previous row, at any
   width or count. Plain flex-wrap can't guarantee that (an item can wrap
   solo while its "partner" stays behind), which is why this is grid, not flex. */
.footer-fields-wrapper--single.footer-fields-wrapper--no-lines .footer-fields__groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* 100% basis, so the grid wraps onto its own line under the header pair
     ("Property" cell + effect name) rather than sitting beside it. */
  flex: 1 1 100%;
  min-width: 0;
  gap: 1px;
  background: #313131;
}

.footer-fields-wrapper--single.footer-fields-wrapper--no-lines .footer-fields__groups .control-group {
  width: auto;
  min-width: 0;
  max-width: none;
  /* The grid's 1px gap over a #313131 ground already draws the rule between
     rows (and between compact columns). .control-group's own border-top then
     stacked a second 1px on top of it, making every horizontal line in this
     layout 2px thick against the 1px lines of the two-column one. */
  border-top: 0;
}

.footer-fields-wrapper--single.footer-fields-wrapper--no-lines .footer-fields__groups .control-group--static {
  grid-column: 1 / -1;
}

@media (max-width: 780px) {
    .footer-fields-wrapper--single {
      flex-direction: column;
    }
    .footer-fields-wrapper--single .footer-fields--effect {
      width: 100%;
    }
  }

.footer-fields.has-previous {
    /* border-top: 1px solid var(--color-border); */
    margin-top: 0;
    padding-top: 0;
  }     

.footer-fields__title {
  font-size: 11px;
  position: relative;
  color: #CCCCCC;
  padding: 4px 6px;
  /* Fixed instead of content-sized: .footer-fields--labels' title is plain
     text (~21px tall by content alone), while .footer-fields--effect's title
     also holds the 18px .footer-fields__mirror button (26px tall by content).
     Left to size themselves, the two columns' title rows landed at different
     heights and every row below them drifted out of alignment across the
     label/effect divider. */
  height: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.footer-fields__title-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
}

.footer-fields__title-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-fields__title-label:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}

.footer-fields__mirror,
.footer-fields__marker {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.footer-fields__mirror:hover,
.footer-fields__marker:hover {
  color: var(--color-text-primary);
}

/* "Add marker" in the Effect column's title, right beside the name: the name doesn't grow there, so
   the title row centers the two together instead of pushing the icon to the column's edge. */
.footer-fields--effect[data-footer-effect="effect"] .footer-fields__title-text {
  flex: 0 1 auto;
}

.footer-fields__marker-icon {
  width: 11px;
  height: 11px;
  display: block;
}

/* "Add marker": the footer's own button style (.footer-trigger: a pill with a thin gray outline, gray text,
   lighter on hover), small enough for the column's title - the marker icon and "Add". */
.footer-fields__marker--add {
  width: auto;
  height: 18px;
  padding: 0 7px 0 5px;
  gap: 3px;
  border: 0.3px solid #646464a8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #878787;
  font-size: 10px;
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.footer-fields__marker--add:hover,
.footer-fields__marker--add:focus-visible {
  border-color: #AEAEAE;
  background: rgba(255, 255, 255, 0.07);
  color: #AEAEAE;
}

.footer-fields__marker--add:active {
  transform: scale(0.95);
}

.footer-fields__marker--add .footer-fields__marker-icon {
  width: 10px;
  height: 10px;
}

/* The trash beside it: the Delete button's style (a muted red outline), round. */
.footer-fields__marker--remove {
  margin-left: 2px;
  border: 0.3px solid rgba(255, 75, 85, 0.3);
  border-radius: 999px;
  background: rgba(255, 75, 85, 0.05);
  color: #c9777d;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.footer-fields__marker--remove:hover,
.footer-fields__marker--remove:focus-visible {
  border-color: rgba(255, 75, 85, 0.5);
  background: rgba(255, 75, 85, 0.11);
  color: #e58a90;
}

.footer-fields__trash-icon {
  width: 11px;
  height: 11px;
  display: block;
}

/* Layer / Text switch: a direction with both a regular and a text preset. */
.footer-fields__kind {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 18px;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  overflow: hidden;
}

.footer-fields__kind.hidden {
  display: none;
}

.footer-fields__kind-btn {
  height: 100%;
  padding: 0 6px;
  background: none;
  border: none;
  outline: none;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.footer-fields__kind-btn + .footer-fields__kind-btn {
  border-left: 1px solid #3a3a3a;
}

.footer-fields__kind-btn:hover {
  color: var(--color-text-primary);
}

.footer-fields__kind-btn.is-active {
  background: #2d2d2d;
  color: var(--color-text-primary);
}

.footer-fields--labels .control-group {
  justify-content: center;
  height: var(--footer-control-height, 25px);
  align-items: center;
}

.footer-fields--labels .control-group__label,
.footer-fields-wrapper--single .footer-fields--effect .control-group__label {
  width: auto;
  color: var(--color-text-secondary);
  /* The box is already centered by .footer-fields--labels .control-group, but
     .control-group__label's min-width: 42px keeps a short caption's box wider
     than its text — and the text sits at that box's left edge. "Scale" then
     lines up with "Position"/"Rotation"/"Opacity" instead of reading centered
     like them. Center the text inside the box too. */
  text-align: center;
}

.footer-fields--effect .control-group__label {
  display: none;
}

.control-group {
  background: #0E0E0E;
  font-size: 10px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  position: relative;
  border-top: 1px solid #313131;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.footer-fields .control-group:first-of-type {
  border-top: none;
}

.control-group[data-footer-group="directions"] {
  height: var(--footer-control-height, 29px);
}

.control-group--static {
  height: var(--footer-control-static-height, 31px) !important;
  padding: 0 2px;
  width: 100%;
  background: #292929;
}

.control-group[data-footer-group="shift"] {
  padding: 0 4px;
}

.footer-direction-grid {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  /* padding: 0 2px 0 2px; */
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.footer-direction-button {
  width: 22px;
  height: 22px;
  min-width: 14px;
  flex: 0 0 22px;
  padding: 0;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  display: inline-flex;
  outline: none;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.footer-direction-button:hover,
.footer-direction-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text-primary);
}

.footer-direction-button:active {
  transform: translateY(1px);
}

.footer-direction-icon {
  width: 16px;
  height: 16px;
  transform-origin: 50% 50%;
}

.footer-direction-icon--reverse {
  width: 12px;
  height: 12px;
}

.footer-direction-button[data-direction="right"] .footer-direction-icon {
  transform: rotate(0deg);
}

.footer-direction-button[data-direction="left"] .footer-direction-icon {
  transform: rotate(180deg);
}

.footer-direction-button[data-direction="up"] .footer-direction-icon {
  transform: rotate(-90deg);
}

.footer-direction-button[data-direction="down"] .footer-direction-icon {
  transform: rotate(90deg);
}

.footer-direction-button[data-direction="up-right"] .footer-direction-icon {
  transform: rotate(-45deg);
}

.footer-direction-button[data-direction="up-left"] .footer-direction-icon {
  transform: rotate(-135deg);
}

.footer-direction-button[data-direction="down-right"] .footer-direction-icon {
  transform: rotate(45deg);
}

.footer-direction-button[data-direction="down-left"] .footer-direction-icon {
  transform: rotate(135deg);
}

.control-group--compact .footer-direction-button {
  width: 22px;
  height: 22px;
}

.footer-shift-grid {
  display: inline-flex;
  align-items: center;
  gap: clamp(2px, 1vw, 6px);
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.footer-shift-button {
  min-width: 14px;
  width: auto;
  height: 22px;
  flex: 0 0 auto;
  border: none;
  border-radius: 6px;
  background: transparent;
  outline: none;
  color: #878787;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  /* padding: 0 6px; */
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.footer-shift-button:hover,
.footer-shift-button:focus-visible {
  color: #aeaeae;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.footer-grid-item--collapsed {
  display: none !important;
}

.control-group__label {
  user-select: none;
  min-width: 42px;
  /* Keeps the caption off the cell's edges and dividers. */
  padding: 0 4px;
  font-size: 11px;
  color: var(--color-text-muted);
  flex: 0 0 auto;
  white-space: nowrap;
}

.control-group__axis {
  color: var(--color-text-muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  user-select: none;
  flex: 0 0 auto;
  pointer-events: none;
  display: none;
}

.control-group__axis--x {
}

.control-group__axis--y {
}

.control-group__input {
  text-align: center;
  border: none;
  background: none;
  color: #076DE4;
  font-size: 12px;
  letter-spacing: 0.04em;
  min-width: 9px;
  flex: 1 1 0;
  /* line-height: 1.4; */
  padding: 4px 0;
  cursor: ew-resize;
}

.control-group__inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

/* Width is set inline (in ch, per character count) by updateFooterFieldWidth
   in useFooterFieldSync.js — these rules only set the floor/ceiling so a
   short "0" doesn't collapse and a long "-1234.56" doesn't blow up the row. */
.control-group[data-footer-group="position"] .control-group__input {
  flex: 0 0 auto;
  min-width: 18px;
  max-width: 54px; /* fits up to "-100000" */
}

.control-group[data-footer-group="scale"] .control-group__input {
  flex: 0 0 auto;
  min-width: 18px;
  max-width: 54px; /* fits up to "-100000" */
}

.control-group[data-footer-group="rotation"] .control-group__input {
  flex: 0 0 auto;
  min-width: 18px;
  max-width: 54px; /* fits up to "-100000" */
  text-align: center;
}

.control-group[data-footer-group="opacity"] .control-group__input {
  flex: 0 0 auto;
  min-width: 18px;
  max-width: 25px; /* opacity tops out at "100" — no need for the wider cap */
  text-align: center;
}

.control-group[data-footer-group="blur"] .control-group__input {
  flex: 0 0 auto;
  min-width: 18px;
  max-width: 46px; /* blur has no upper bound — sized for up to 6 digits */
  text-align: center;
}

.control-group[data-footer-group="steps"] .control-group__input {
  flex: 0 0 auto;
  min-width: 18px;
  max-width: 46px; /* steps tops out at 1000, but multi-select deltas can go negative ("-1000") */
  text-align: center;
}

.control-group__input--turns {
  flex: 1 0 0;
  min-width: 24px;
  text-align: right !important;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.control-group__unit {
  color: var(--color-text-muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  user-select: none;
  flex: 0 0 auto;
  pointer-events: none;
  display: none;
}

.control-group__unit[data-unit-for="rotationInputIn"],
.control-group__unit[data-unit-for="rotationInputOut"] {
  font-size: 11px;
}

.control-group__turns-sep {
  color: var(--color-text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin: 0 5px;
  position: relative;
  top: -1px;
  user-select: none;
}

.footer-fields--effect .control-group {
  height: var(--footer-control-height, 30px);
  align-items: center;
}

.control-group__input:focus {
  outline: none;
}

/* Typing a value (a click on the field; not a drag, which focuses it too): After Effects' own field then - black,
   a thin blue frame with round corners, white text, the selection in blue. The frame's room is taken back by
   negative margins, so nothing beside the field moves. */
body:not(.is-dragging-value) .control-group__input:focus:not(.control-group__input--turns) {
  position: relative;
  z-index: 1;
  box-sizing: content-box;
  margin: 0 -3px; /* as much as the 3px between a number and its neighbours: the frame touches, never covers them */
  padding-left: 3px;
  padding-right: 3px;
  border-radius: 4px;
  background: #000;
  box-shadow: inset 0 0 0 1px #2d8ceb;
  color: #ffffff;
  caret-color: #ffffff;
  cursor: text;
}

/* A field as wide as its row (a single value: Decay, Bounces... flex: 1) is, while typed in, as wide as its
   digits (the width in ch useFooterFieldSync gives it): AE's frame goes round the number, not across the row. */
body:not(.is-dragging-value) .control-group__input:focus:not(.control-group__input--turns) {
  flex: 0 0 auto;
}

/* The frame reaches past the fields' box (overflow: hidden there), at the left edge of an Edit row's value. */
body:not(.is-dragging-value) .control-group__inputs:focus-within {
  overflow: visible;
}

.control-group__input:focus::selection {
  background: #2d8ceb;
  color: #ffffff;
}

.control-group__input:hover {
  color: var(--color-text-primary);
}

.control-group__input--turns:hover {
  color: #076DE4;
}

.control-group__input::-webkit-outer-spin-button,
.control-group__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.control-group__input[type="number"] {
  -moz-appearance: textfield;
}

.control-group.is-hidden {
  display: none;
}

.control-group__unit.is-visible,
.control-group__axis.is-visible {
  display: inline;
}

.control-group__input.is-hidden {
  display: none;
}

@media (min-width: 1200px) {
  .footer-fields-wrapper {
    --footer-label-column: 100px;
  }
}

/* .control-group:focus-within {
  border-color: rgba(31, 155, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(31, 155, 255, 0.2);
  background: rgba(31, 155, 255, 0.08);
} */

.control-group__value {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
}

.control-group__reset {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  outline: none;
  color: #2d8cebd1;
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 6px 2px 0px;
  /* cursor: pointer; */
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.control-group__reset-icon {
  display: block;
  width: 12px;
  height: 12px;
}

.control-group__reset:hover,
.control-group__reset:focus {
  color: var(--color-text-primary);
}

.control-group__reset.is-hidden {
  display: none !important;
  visibility: hidden !important;
}

.control-group.is-placeholder .control-group__reset {
  display: none !important;
  visibility: hidden !important;
}

.footer-change-overlay {
  position: fixed;
  z-index: 1000;
  background: rgba(35, 35, 35, 0.9);
  color: var(--color-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -18px) scale(0.98);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  max-width: 260px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.footer-change-overlay.is-visible {
  opacity: 1;
  transform: translate(-50%, -26px) scale(1);
}

.footer-change-overlay__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-change-overlay__line {
  white-space: nowrap;
}

.footer-change-overlay__value {
  color: var(--color-text-primary);
}

body.is-dragging-value,
body.is-dragging-value * {
  cursor: ew-resize !important;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  background: transparent;
  /* padding: 2px 4px 4px; */
  /* border-top: 1px solid rgba(255, 255, 255, 0.04); */
}

.footer-triggers {
    gap: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 6px 6px;
    border-top: 2px solid #0f0f0f;
    background-color: #1D1D1D;
    position: relative;
    /* Not hidden: .footer-overflow-wrapper (button + popup) now lives inside
       this element (see FooterActions.jsx) and floats outside its box in
       both layouts — clipping here would hide the button/popup entirely. */
    overflow: visible;
}

/* Docked in-flow right after the first divider (next to Paste) — its popup
   is what's absolutely positioned (opens upward, centered on the button; see
   below), not the wrapper itself. */
.footer-overflow-wrapper {
  position: relative;
  display: none;
  z-index: 100;
}

/* After the divider (what it holds stood there on the bar): the bar's 10px gap on both sides of the divider.
   useFooterOverflow counts any margin in the chevron's width. */
.footer-actions.has-overflow .footer-overflow-wrapper {
  display: flex;
  margin-left: 0;
}

.footer-overflow-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1D1D1D;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #878787;
  outline: none;
  cursor: default;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.footer-overflow-btn:hover,
.footer-overflow-btn:focus-visible {
  color: #c0c0c0;
  background: #2a2a2a;
  border-color: #505050;
}

.footer-overflow-btn svg {
  width: 10px;
  height: 10px;
}

/* Candidate groups must not shrink — overflow detection relies on them overflowing */
.footer-actions__group--end {
  flex-shrink: 0;
}

/* Popup: opens above the overflow button, centered on it (same anchor point
   in both the floating and single-effect docked layouts — see below).
   Always rendered (display:flex) so the wrapper size stays stable — no layout jump on hover. */
.footer-overflow-popup {
  position: absolute;
  bottom: 100%;
  top: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  margin-bottom: 4px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  background: #1e1e1e;
  border: 1px solid #313131;
  border-radius: 6px;
  padding: 4px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.footer-overflow-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Chevron points left by default (popup used to expand sideways); rotate it
   to point up to match the popup opening upward, centered on the button. */
.footer-overflow-btn .footer-button__icon {
  transform: rotate(90deg);
}

/* Single-effect layout (only one effect on the layer, e.g. In> only): the
   overflow button here should read as just another .footer-button (square,
   borderless until hover) rather than the default layout's boxed look. */
.footer-fields-wrapper--single.footer-fields-wrapper--no-lines ~ .footer-actions .footer-overflow-btn {
  width: 30px;
  border: 1px solid transparent;
  border-radius: 3px;
}

.footer-fields-wrapper--single.footer-fields-wrapper--no-lines ~ .footer-actions .footer-overflow-btn:hover,
.footer-fields-wrapper--single.footer-fields-wrapper--no-lines ~ .footer-actions .footer-overflow-btn:focus-visible {
  color: #AEAEAE;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Group hiding */
.is-group-hidden {
  display: none !important;
}

/* Temporarily un-hide a grouped button so its popup can anchor to it */
.is-group-hidden.is-temp-visible {
  display: inline-flex !important;
}

.footer-triggers::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: 0 0 0 1px #313131 inset;
  z-index: 1;
}

.footer-actions__group--arrows {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.footer-actions__group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* The parent action row uses a 10px group gap. Offset just this group so
   the settings gear has the same 6px spacing on both sides. */
/* the divider after it as far from AI as from Frame (the bar's 10px gap on both sides) */
.footer-actions__group--chips { margin-right: 0; }

/* One-click Layer + Color auto-sync control, placed next to Copy/Paste. */
.footer-sync-settings__button {
  width: 26px;
  height: 26px;
}

.footer-sync-settings__button .footer-button__icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.footer-sync-settings__button.is-active {
  color: #076DE4;
  background: #0E0E0E;
  border-color: transparent;
}

/* The shared footer SVG rule normally forces all icon strokes to gray.
   Keep the auto-sync gear in the exact blue used by the numeric factor. */
.footer-sync-settings__button.is-active svg [stroke] { stroke: #076DE4; }
.footer-sync-settings__button.is-active svg [fill]:not([fill="none"]) { fill: #076DE4; }

/* Popup behind the chevron next to Delete, holding the text / effects-
   visibility / magic tools. It floats above the footer rather than widening
   it, so the bar keeps its length no matter how many tools live here.
   Chrome matches the panel's existing .footer-overflow-popup. */
/* Nothing in the bar squashes — neither the groups nor the controls inside
   them. Copy/Paste used to compress instead of the row running out of slack,
   which both deformed the buttons and hid the fact that the bar was full, so
   useFooterCompactBar could never tell that it had to step in. */
.footer-triggers > *,
.footer-triggers .footer-trigger,
.footer-triggers .footer-button,
.footer-triggers .footer-scale-stepper,
.footer-triggers .footer-scale-stepper__input {
  flex-shrink: 0;
}

/* Frame / Directions / Shift: pressed while their panel is open (FooterActions openPanels). */
.footer-actions__group--arrows .footer-button.is-active {
  background: #151515;
  border-color: transparent;
}

.footer-actions__group--arrows .footer-button.is-active svg [fill]:not([fill="none"]) {
  fill: #076DE4;
}

/* ── The Tools tab (ToolsPanel): Split text, Effects visibility, Magic ───────
   The menus the footer's tools popup used to hold, one card each. They render
   with `inline` (no floating chrome of their own); the rules below keep them
   flat inside their card and on one spacing rhythm. */
.tools-panel {
  --tools-pad: 8px;
  /* A folded card stays as tall as its title instead of stretching to the row's tallest card. */
  align-items: start;
}

.tools-panel__section {
  min-width: 0;
  background: #1e1e1e;
}

/* The card's title folds and unfolds it (ToolsPanel ToolCard). */
.tools-panel__title {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 25px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid #000000;
  outline: none;
  background: #171717;
  color: var(--color-text-primary);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.tools-panel__title:hover,
.tools-panel__title:focus-visible {
  background: #1f1f1f;
}

.tools-panel__chevron {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}

.tools-panel__section.is-folded .tools-panel__chevron {
  transform: rotate(-90deg);
}

.tools-panel__section.is-folded .tools-panel__title {
  border-bottom: 0;
}

.tools-panel__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--tools-pad);
}

.tools-panel__body[hidden] {
  display: none;
}

/* The panels put 10px (effects) and 6px (magic) above the option group under
   their own divider, which no longer matches the 8px everything else in the
   card uses — so a group ended up framed unevenly between its divider and
   the card's. One value for both. */
.tools-panel .footer-effects-menu__scope {
  padding-top: var(--tools-pad);
}

/* The scope options run in a row and wrap onto as many rows as the card's width needs. */
.tools-panel .footer-effects-menu__scope {
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 7px;
}

.tools-panel .footer-effects-menu__option {
  white-space: nowrap;
}

.tools-panel .footer-effects-menu__actions {
  gap: 7.2px;
}

/* The effects menu sets its own width (a 170px minimum); inside a Tools card it fills the card, so its
   buttons stretch with it. */
.tools-panel .footer-menu--inline {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* The split-text rows carry 14px of side padding meant for a floating menu
   with its own border. Inside a Tools card that reads as an indent the magic and
   effects menus don't have, so their content starts on a different vertical
   than everything else here. */
.tools-panel .footer-menu--inline .footer-menu__item {
  padding-left: 0;
  padding-right: 0;
  /* Same type as the labels in the effects and magic panels
     (.footer-effects-menu__option): 12px on
     #b2b2b2. The stock menu row is 11px on #c9c9c9 — smaller and lighter —
     which showed as soon as they sat side by side. letter-spacing is
     dropped too: neither of those sets it, so it inherits. */
  font-size: 12px;
  color: #b2b2b2;
  letter-spacing: normal;
  /* The stock 9px each side spaced the rows 18px apart, which read as three
     separate things rather than one menu; this keeps them a single list. */
  padding-top: 1.5px;
  padding-bottom: 1.5px;
}

/* That vertical padding is spacing between rows; on the first and last it
   would also pad the menu's own top and bottom, putting more space there than
   at the sides. Trimmed on the ends only, so the gap around the menu matches
   the card's inset on every side while the rows keep their spacing from each
   other. */
.tools-panel .footer-menu--inline .footer-menu__item:first-child {
  padding-top: 0;
}

.tools-panel .footer-menu--inline .footer-menu__item:last-child {
  padding-bottom: 0;
}

/* A menu rendered inside a Tools card drops its own floating chrome — the card
   already provides the ground, border and padding.

   Scoped under .tools-panel on purpose: .footer-menu and .footer-effects-menu
   are single-class selectors too, and they sit later in
   this file, so an unscoped .footer-menu--inline lost the tie and the menu
   stayed absolutely positioned and floated out of its card. */
.tools-panel .footer-menu--inline {
  position: static;
  bottom: auto;
  left: auto;
  right: auto;
  /* Width: the card's (the rule above). */
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  /* .footer-menu blurs whatever is behind it. With its background cleared the
     blur has nothing to sit on but still draws a visible seam along its own
     top edge, which read as a stray divider inside a Tools card. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* The menus space their own sections 10px apart, which is what puts the gap
     between the last button and the divider under it. Inside a Tools card that
     divider should sit the same distance from the content as the card's top
     edge does — one shared value, so they can't drift. */
  gap: var(--tools-pad);
  padding: 0;
  z-index: auto;
  overflow: visible;
}

.footer-actions__group--end {
  position: relative;
  /* Right-aligned by an auto margin, which collapses to nothing once the row
     fills the bar — so Delete sits at the right edge while there is room and
     comes to rest against Paste when there isn't, instead of being pushed out
     of view. That it no longer overflows is down to the media query above,
     which drops the middle groups before the row gets that tight. */
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.footer-actions__divider {
  width: 1px;
  height: 28px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.26);
  opacity: 0.45;
}

.footer-actions__divider--muted {
  opacity: 0.3;
}

.footer-trigger {
    --footer-trigger-action-width: 54px;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border: 0.3px solid #646464a8;
    background: rgba(255, 255, 255, 0.03);
    color: #878787;
    border-radius: 999px;
    font-weight: 600;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.footer-trigger:hover {
  color: #AEAEAE;
  border-color: #AEAEAE;
  background: rgba(255, 255, 255, 0.07);
}

.footer-trigger--copy,
.footer-trigger--paste,
.footer-trigger--danger {
    box-sizing: border-box;
    width: var(--footer-trigger-action-width);
    height: 26px;
    justify-content: center;
    gap: 4px;
    padding: 0 14px;
    border-radius: 999px;
}

.footer-trigger--copy,
.footer-trigger--paste {
    gap: 0;
    border: 0;
    color: #EFEFEF;
    background: #066CE3;
}

.footer-trigger--copy:hover,
.footer-trigger--copy:focus-visible,
.footer-trigger--paste:hover,
.footer-trigger--paste:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: #0862c8;
}

/* Pressed, and while its menu is open: After Effects' own pressed / focused button (its dialogs' OK) - a
   darker blue inside a light blue ring, a thin dark gap between them. */
.footer-trigger--copy:active,
.footer-trigger--paste:active,
.footer-trigger--copy[aria-expanded="true"],
.footer-trigger--paste[aria-expanded="true"] {
  background: #0757ad;
  box-shadow: 0 0 0 1.5px #1b1b1b, 0 0 0 3.5px #4a9df8;
}

.footer-trigger--copy .footer-trigger__label,
.footer-trigger--paste .footer-trigger__label {
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
}

/* A red tint at rest too: it deletes. */
.footer-trigger--danger {
    background: rgba(255, 75, 85, 0.05);
    border-color: rgba(255, 75, 85, 0.3);
    color: #c9777d;
    border-width: 2px;
    overflow: hidden;
    width: 64px;
}

/* Narrowest footer (useFooterOverflow level 4): Delete as an icon. */
.footer-trigger--danger.footer-trigger--icon-only {
  width: 38px;
  padding: 0;
}

.footer-trigger--danger:hover,
.footer-trigger--danger:focus-visible {
  border-color: rgba(255, 75, 85, 0.5);
  background: rgba(255, 75, 85, 0.11);
  color: #e58a90;
}

/* Off when a click would do nothing (FooterActions: no preset on the selection / nothing copied), as After
   Effects' own buttons are off: no colour left - a flat gray fill (Copy / Paste) or a gray outline (Delete)
   and gray text, the same on hover. */
.footer-trigger--copy:disabled,
.footer-trigger--copy:disabled:hover,
.footer-trigger--paste:disabled,
.footer-trigger--paste:disabled:hover {
  color: #6a6a6a;
  background: #2c2c2c;
  box-shadow: none;
  cursor: default;
}

.footer-trigger--danger:disabled,
.footer-trigger--danger:disabled:hover {
  color: #6a6a6a;
  border-color: #2e2e2e;
  background: transparent;
  cursor: default;
}

.footer-trigger__icon {
  width: 11px;
  height: 11px;
  display: block;
  flex-shrink: 0;
}

.footer-trigger--danger .footer-trigger__icon [stroke] {
  stroke: currentColor;
}

.footer-trigger--danger .footer-trigger__icon [fill]:not([fill="none"]) {
  fill: currentColor;
}

.footer-actions svg [stroke] {
  stroke: #B2B2B2;
}

.footer-actions svg [fill]:not([fill="none"]) {
  fill: #B2B2B2;
}

.footer-actions svg [fill="none"] {
  fill: none;
}

.footer-trigger:hover .footer-trigger__icon,
.footer-trigger:focus-visible .footer-trigger__icon {
  filter: brightness(1.1);
}

.footer-trigger__label {
  font-size: 11px;
  display: inline-block;
  letter-spacing: 0.02em;
}

.footer-trigger.is-active {
  color: #AEAEAE;
  border-color: #AEAEAE;
  background: rgba(255, 255, 255, 0.07);
}

.footer-trigger--danger.is-active {
  background: rgba(255, 75, 85, 0.35);
  color: #ffffff;
}

.icon {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.footer-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  min-width: 120px;
  border-radius: 10px;
  border: 1px solid #8787874f;
  background: rgba(32, 32, 32, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 20;
  overflow: hidden;
}

.footer-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Copy/Paste/Delete selection menu sits closer to the footer than the rest. */
#footerActionMenu {
  bottom: calc(100% + 6px);
}

.footer-menu--danger {
  border-color: rgba(215, 131, 142, 0.6);
  background: rgba(59, 39, 37, 0.75);
}

.footer-split-text-menu {
  min-width: 154px;
}

.footer-menu__item {
  padding: 9px 14px;
  background: none;
  border: none;
  color: #c9c9c9;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.01em;
  text-transform: none;
  transition: background var(--transition-fast), color var(--transition-fast), padding var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-menu__item:hover,
.footer-menu__item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f5;
  outline: none;
}

.footer-menu__item:hover{
  background: #2A2A2A;
  color: #ffffff;
}

.footer-menu--danger .footer-menu__item:hover,
.footer-menu--danger .footer-menu__item:focus-visible {
  background: rgba(255, 75, 85, 0.2);
  color: #ffe0e3;
}

.footer-menu__icon {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
}

.footer-menu__item:hover .footer-menu__icon,
.footer-menu__item:focus-visible .footer-menu__icon,
.footer-menu__item.is-active .footer-menu__icon {
  filter: brightness(1.08);
  color: #AEAEAE;
}

.footer-menu--danger .footer-menu__item.is-active .footer-menu__icon {
  color: #ffb3b8;
}

/* The Copy / Paste / Delete menu (SelectionMenu): each icon in a button of its own, the rows close together -
   4px around them (the rows' corners follow the menu's 10px ones), 2px between them. */
#footerActionMenu {
  padding: 4px;
  gap: 2px;
}

#footerActionMenu .footer-menu__item {
  padding: 2px 10px 2px 2px;
  gap: 8px;
  border-radius: 6px;
}

.footer-menu__icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 0.5px solid rgba(135, 135, 135, 0.35);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.footer-menu__icon-box .footer-menu__icon {
  width: 13px;
  height: 13px;
}

.footer-menu__item:hover .footer-menu__icon-box,
.footer-menu__item:focus-visible .footer-menu__icon-box,
.footer-menu__item.is-active .footer-menu__icon-box {
  border-color: rgba(174, 174, 174, 0.6);
  background: rgba(255, 255, 255, 0.1);
}

.footer-menu--danger .footer-menu__icon-box {
  border-color: rgba(215, 131, 142, 0.35);
  background: rgba(255, 75, 85, 0.08);
}

.footer-menu--danger .footer-menu__item:hover .footer-menu__icon-box,
.footer-menu--danger .footer-menu__item:focus-visible .footer-menu__icon-box,
.footer-menu--danger .footer-menu__item.is-active .footer-menu__icon-box {
  border-color: rgba(215, 131, 142, 0.65);
  background: rgba(255, 75, 85, 0.18);
}

/* ── The Tools tab's Magic card (MagicMenu): MotionBoy's buttons, the label then its icon, one under the
   other - Create Controller, under a divider the MOGRT steps (Create MOGRT with the trash button beside it,
   Responsive Design, Export MOGRT), under another the MOGRT options. A button's tick or cross (.is-done / .is-failed)
   replaces its content for a moment after it ran. Hover as the Effects visibility card's buttons. */
.footer-magic-menu {
  display: flex;
  flex-direction: column;
  gap: var(--tools-pad);
  outline: none;
}

.footer-magic-menu__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7.2px;
}

/* A divider between Create Controller and the MOGRT steps, and above the options. */
.footer-magic-menu__buttons--mogrt,
.footer-magic-menu__options {
  padding-top: var(--tools-pad);
  border-top: 1px solid #313131;
}

.footer-magic-menu__button {
  position: relative;
  min-height: 29px;
  padding: 6px 8px;
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b2b2b2;
  outline: none;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
}

.footer-magic-menu__button--wide {
  grid-column: 1 / -1;
  justify-content: center;
  text-align: center;
}

/* Create MOGRT and, beside it, the square trash button (Clear Essential Graphics). */
.footer-magic-menu__row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7.2px;
}

/* In the row Create MOGRT takes the first column only. */
.footer-magic-menu__row > .footer-magic-menu__button--wide {
  grid-column: auto;
}

/* Square: as wide as the buttons are high (15px icon + 2 x 6px padding + 2 x 1px border). */
.footer-magic-menu__button--icon {
  width: 29px;
  padding: 6px 0;
  justify-content: center;
}

/* A label that no longer fits ends in an ellipsis; the full text is in the hint. */
.footer-magic-menu__button > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.footer-magic-menu__icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: currentColor;
}

.footer-magic-menu__button:hover,
.footer-magic-menu__button:focus-visible {
  background: #2b2b2b;
  color: #ffffff;
}

/* The MOGRT options, as the Effects card's: in a row, wrapping onto as many rows as the card's width needs. */
.footer-magic-menu__options {
  display: flex;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 7px;
}

.footer-magic-menu__option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b2b2b2;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.footer-magic-menu__option:hover {
  color: #ffffff;
}

/* A checkbox in the Effects card's radio colours, square. */
.footer-magic-menu__option input {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin: 0;
  border-radius: 3px;
  border: 1px solid #4c4c4c;
  background: #2a2a2a;
  box-shadow: inset 0 0 0 3px #2a2a2a;
  outline: none;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.footer-magic-menu__option input:checked {
  border-color: #066ce3;
  background: #066ce3;
  box-shadow: inset 0 0 0 3px #1d1d1d;
}

.footer-magic-menu__option:hover input {
  border-color: #6a6a6a;
}

.footer-magic-menu__option input:focus-visible {
  border-color: #8abfff;
  box-shadow: 0 0 0 2px rgba(6, 108, 227, 0.35), inset 0 0 0 3px #2a2a2a;
}

.footer-magic-menu__feedback {
  width: 15px;
  height: 15px;
  animation: footer-magic-menu-feedback 1666ms ease-in-out both;
}

.footer-magic-menu__button.is-done {
  color: #4ade80;
}

.footer-magic-menu__button.is-failed {
  color: #ff4b55;
}

.footer-magic-menu__button.is-restoring > * {
  animation: footer-magic-menu-restore 167ms ease-in-out both;
}

@keyframes footer-magic-menu-feedback {
  0% { opacity: 0; transform: scale(0.91); }
  20% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.03); }
}

@keyframes footer-magic-menu-restore {
  from { opacity: 0; }
  to { opacity: 1; }
}

.footer-effects-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  outline: none;
  min-width: 170px;
  border-radius: 12px;
  border: 1px solid #313131;
  background: #1d1d1d;
  box-shadow: 0 0 16.6px rgba(0, 0, 0, 0.33);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  z-index: 25;
}

.footer-effects-menu__scope {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid #313131;
}

.footer-effects-menu__option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b2b2b2;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.footer-effects-menu__option input {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin: 0;
  border-radius: 50%;
  border: 1px solid #4c4c4c;
  background: #2a2a2a;
  box-shadow: inset 0 0 0 3px #2a2a2a;
  outline: none;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.footer-effects-menu__option input:checked {
  border-color: #066ce3;
  background: #066ce3;
  box-shadow: inset 0 0 0 3px #1d1d1d;
}

.footer-effects-menu__option:hover {
  color: #ffffff;
}

.footer-effects-menu__option:hover input {
  border-color: #6a6a6a;
}

.footer-effects-menu__option input:focus-visible {
  border-color: #8abfff;
  box-shadow: 0 0 0 2px rgba(6, 108, 227, 0.35), inset 0 0 0 3px #2a2a2a;
}

.footer-effects-menu__option input:checked:focus-visible {
  box-shadow: 0 0 0 2px rgba(6, 108, 227, 0.35), inset 0 0 0 3px #1d1d1d;
}

.footer-effects-menu__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.footer-effects-menu__button {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #222222;
  color: #b2b2b2;
  font-size: 12px;
  line-height: 1;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.footer-effects-menu__button:hover,
.footer-effects-menu__button:focus-visible {
  background: #2b2b2b;
  color: #ffffff;
}

/* Bake / Un-Bake are out of sight for now; the buttons and their actions stay (EffectsMenu.jsx). */
.footer-effects-menu__button--hidden {
  display: none;
}

.footer-effects-menu__icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: currentColor;
}

.footer-button {
  --footer-icon-size: 18px;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  color: #878787;
  outline: none;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.footer-actions__group--end .footer-button[data-action="effects-visibility"] {
  order: 1;
}

.footer-actions__group--end .footer-button[data-action="magic"] {
  order: 2;
}

.footer-actions__group--end .footer-trigger[data-action="delete"] {
  order: 3;
  margin-left: 8px;
}

.footer-button__icon {
  width: var(--footer-icon-size);
  height: var(--footer-icon-size);
  display: block;
  flex: 0 0 var(--footer-icon-size);
}

.footer-button__icon--large {
  width: calc(var(--footer-icon-size) + 2px);
  height: calc(var(--footer-icon-size) + 2px);
  flex-basis: calc(var(--footer-icon-size) + 2px);
}

.footer-button__icon--text-tool {
  width: 18px;
  height: 18px;
}

.footer-button__icon--text-tool path {
  /* The bar's other icons (Directions, Shift) - the old #494949 read as a disabled button. */
  fill: #b2b2b2;
}

.footer-button:hover {
  color: #AEAEAE;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Hints (data-tooltip on any element): HoverTooltip's one tooltip in <body>, the same dark floating style as
   the colour swatches' instead of the browser's white native title bubble, kept inside the panel. */
.footer-button[data-tooltip],
.footer-overflow-btn[data-tooltip],
.footer-scale-stepper__hint[data-tooltip],
.footer-fields__marker[data-tooltip],
.footer-fields__mirror[data-tooltip],
.user-btn[data-tooltip] { position: relative; }

.hover-tooltip {
  position: fixed;
  z-index: 10002;
  width: max-content;
  max-width: min(240px, calc(100vw - 16px));
  box-sizing: border-box;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(35, 35, 35, 0.97);
  color: var(--color-text-primary);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.hover-tooltip.is-below {
  transform: translateY(-3px);
}

.hover-tooltip.is-visible {
  opacity: 1;
  transform: none;
}

.footer-button.is-active {
  color: #2d8cebd1;
  border-color: transparent;
  background: #151515;
}

.footer-button.is-active:hover,
.footer-button.is-active:focus-visible {
  color: #2d8cebd1;
  border-color: transparent;
  background: #151515;
}

.footer-button:active {
  transform: translateY(0.5px) scale(0.98);
}

.footer-scale-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  flex-shrink: 0;
}

/* Carries one half's hint (see FooterActions): the +/- box clips, and an
   <input> can't draw ::after, so each sits in one of these. */
.footer-scale-stepper__hint {
  display: inline-flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.footer-scale-stepper__btns {
  display: inline-flex;
  align-items: center;
  width: 56px;
  flex-shrink: 0;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background-color: transparent;
  overflow: hidden;
}

.footer-scale-stepper__btn {
  width: 0;
  min-width: 0;
  padding: 0;
  flex: 1 1 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: #878787;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
  margin-top: -2px;
}

.footer-scale-stepper__btn:hover {
  color: #AEAEAE;
}

.footer-scale-stepper__btn:active {
  color: #d8d8d8;
}

.footer-scale-stepper__divider {
  width: 1px;
  height: 16px;
  flex-shrink: 0;
  background: #646464a8;
}

.footer-scale-stepper__input {
  width: 34px;
  height: 100%;
  flex-shrink: 0;
  border: 0;
  border-radius: 4px;
  background: #0E0E0E;
  color: #076DE4;
  font-size: 12px;
  text-align: center;
  outline: none;
  cursor: ew-resize;
  -moz-appearance: textfield;
  appearance: textfield;
}

.footer-scale-stepper__input:hover {
  color: #d8d8d8;
}

.footer-scale-stepper__input:focus {
  cursor: text;
}

.footer-scale-stepper__input::-webkit-outer-spin-button,
.footer-scale-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.is-resizing {
  cursor: col-resize !important;
  user-select: none;
}
body.is-resizing .panel,
body.is-resizing .sidebar,
body.is-resizing .content,
body.is-resizing .panel__divider,
body.is-resizing .panel__footer,
body.is-resizing .panel__workspace {
  cursor: col-resize !important;
  user-select: none;
}
body.is-resizing .preview-grid,
body.is-window-resizing .preview-grid {
  pointer-events: none;
}
body.is-resizing .preview-card,
body.is-window-resizing .preview-card {
  transition: none !important;
}

.footer-trigger:hover .footer-trigger__icon,
.footer-menu__item:hover .footer-menu__icon,
.footer-menu__item:focus-visible .footer-menu__icon,
.footer-menu__item.is-active .footer-menu__icon {
  filter: none !important;
}

/* ── Footer color panel (FooterColors.jsx) ──────────────────────────────────
   Second row inside .footer-fields-wrapper, below .footer-fields-row (the
   labels + In/Out effect columns) — same popup box, shown/hidden together
   with it since that visibility is still driven by whether the selected
   layer(s) have an active Motion Boy In/Out effect. */
.footer-colors {
  /* The hairline the action bar's dividers actually paint, resolved to one
     value: rgba(255,255,255,0.26) at opacity 0.45 lands at 0.117 alpha.
     Stated once here so the strip's own divider and the numeric field's
     edge can't drift away from the lines they sit beside. */
  --footer-rule-color: rgba(255, 255, 255, 0.117);
  /* The swatch pill is 15.3px tall in a 25px row, so it floats with ~4.85px
     of ground above and below it. The inset before the first pill is derived
     from that same pair of numbers instead of being eyeballed, so the gap
     reads as equal on all three sides at any --footer-control-height.
     The chip is 1px wider than its pill on each side (32.6 vs 30.6, centered),
     and that slack is already part of the leading gap — subtract it so the
     padding measures to the pill's edge, not the chip's. */
  --footer-swatch-pill-width: 30.6px;
  --footer-swatch-pill-height: 15.3px;
  --footer-swatch-chip-slack: 1px;
  /* A property row above is --footer-control-height tall including its single
     1px border-top, so its interior is (height - 1px). This strip draws both
     a top and a bottom border, so it has to be 1px taller to leave the same
     interior — otherwise its content box is 2px shorter than every row above
     it and the swatch row reads as slightly squashed. */
  --footer-swatch-row-interior: calc(var(--footer-control-height, 25px) - 1px);
  --footer-swatch-inset: calc(
    (var(--footer-swatch-row-interior) - var(--footer-swatch-pill-height)) / 2
    - var(--footer-swatch-chip-slack)
  );
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  height: calc(var(--footer-control-height, 25px) + 1px);
  /* No padding on the strip itself: the left cell has to start at x=0 so its
     border-right lands on the same pixel as .footer-fields' divider above.
     The swatches carry the old 8px inset themselves. */
  padding: 0;
  /* The strip's ground is the header row's own #222222 (.footer-fields-wrapper,
     which the "Property / <effect name>" line sits on unpainted), so the two
     ends of the table match. Named here because several things inside have to
     sit on that same ground: the label cell, and the gap that separates a
     hybrid swatch's ring from its fill. */
  --footer-strip-bg: #222222;
  background: var(--footer-strip-bg);
  border-top: 1px solid var(--footer-strip-bg);
  border-bottom: 1px solid var(--footer-strip-bg);
  max-height: 104px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

/* Names the selection at the head of the swatch strip. The cell carries the
   label column's own classes (.footer-fields--labels > .control-group >
   .control-group__label), so width, font, color, height, centering and the
   @media(min-width:1200px) 100px widening all come from the very rules that
   style Property/Position/Scale above — nothing is restated here that could
   drift out of sync. Only the genuine differences live below. */
.footer-colors__layer {
  background: var(--footer-strip-bg);
  position: sticky;
  top: 0;
  z-index: 1;
  /* Without this the cell ignores its 90px basis: a flex item's automatic
     minimum size is its min-content width, and for a nowrap layer name that
     is the whole name — so a long one widened the column and pushed the
     swatches out instead of being clipped. */
  min-width: 0;
}

.footer-colors__layer .control-group {
  /* The strip's own border-top already draws this row's top line; without
     this the .control-group inside would stack a second one on it. */
  border-top: 0;
  /* .control-group's own #0E0E0E would leave the label cell a dark patch in
     an otherwise uniform band. */
  background: var(--footer-strip-bg);
  height: var(--footer-swatch-row-interior);
  flex: 0 0 auto;
  min-width: 0;
  /* The fade lives here, on the full-width cell, not on the label: a label
     that fits is only as wide as its text, so a mask on it would fade that
     text's own tail (a short "Word 2" lost its "2"). At this level the fade
     zone is the column's last 14px, which is empty until a name actually
     reaches it. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent 100%);
}

/* A layer name is arbitrary text, unlike the fixed "Position"/"Scale"
   captions, so it has to shrink inside the column instead of pushing through
   it (the base rule is flex: 0 0 auto with min-width: 42px).
   
   While it fits, the box is content-sized and the .control-group centers it,
   so text-align does nothing. Once it doesn't, the box fills the column and
   the alignment decides where the overflow goes: centered would clip the name
   at both ends, so it's aligned left and runs off the right edge only.
   
   The right edge fades out rather than ending in an ellipsis; that mask sits
   on the cell above, not here — see .footer-colors__layer .control-group. */
.footer-colors__layer .control-group__label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: clip;
}

/* .footer-fields-wrapper--single hides .footer-fields--labels, and this cell
   wears that class — so it has to un-hide itself here. It keeps the column
   styling either way, since the single-effect rows now have a label column
   of their own; only the 1px that .footer-fields--effect pads its grid with
   has to be matched, so this cell's divider and the rows' dividers agree.
   Same specificity as the rule that hides it, so it must stay after it. */
.footer-fields-wrapper--single .footer-colors__layer {
  display: flex;
}

.footer-colors::-webkit-scrollbar {
  width: 4px;
}

.footer-colors::-webkit-scrollbar-track {
  background: transparent;
}

.footer-colors::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.footer-colors::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.55);
}

.footer-colors__swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  height: 100%;
  gap: 2.2px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 var(--footer-swatch-inset);
}

/* Text stroke width, shown beside its stroke swatch. Styled after
   .footer-scale-stepper__input (the "1.1" factor field) — same ground, same
   accent digits, same ew-resize affordance — but sized to this row's pill
   rather than the 28px action bar. */
.footer-colors__width {
  /* Exactly a swatch's box, from the same variables — the field sits in the
     strip as one more pill, not as a wider outlier. The chip's 1px of slack
     is reproduced as a margin so the gaps around it match the gaps around
     every swatch too. */
  width: var(--footer-swatch-pill-width);
  height: var(--footer-swatch-pill-height);
  margin: 0 var(--footer-swatch-chip-slack);
  flex-shrink: 0;
  border: 0;
  /* Rounded like the "1.1" factor field, not pill-shaped like the swatches —
     it is an input, and the softer corner is what marks it as one. */
  border-radius: 4px;
  /* Same dark ground as the "1.1" factor field this one is modelled on
     (.footer-scale-stepper__input), not a lighter chip — the grey hairline
     below is what gives it its edge. */
  background: #0E0E0E;
  /* The same hairline the swatches carry (.footer-colors__swatch), kept faint
     so the field reads as part of the strip rather than a hole in it without
     competing with the colors beside it. */
  box-shadow: 0 0 0 1px var(--footer-rule-color);
  color: #076DE4;
  font-size: 11px;
  text-align: center;
  outline: none;
  cursor: ew-resize;
  -moz-appearance: textfield;
  appearance: textfield;
}

.footer-colors__width::-webkit-outer-spin-button,
.footer-colors__width::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Separates the layer's own colors from each effect's colors in a
   single-layer selection (see toGroups in FooterColors.jsx). Matches
   .footer-actions__divider in the action bar below, but sized to this row:
   it spans the swatch pill's height rather than the 28px button height.

   The margin is the chip's own slack, not the strip's edge inset: the
   swatches container's 2.2px gap already sits on both sides of the divider,
   and a chip contributes 1px of transparent slack beside its pill. Matching
   that 1px here makes the pill-to-divider gap identical to the
   pill-to-pill gap (1 + 2.2 + 1) instead of noticeably wider. */
.footer-colors__divider {
  width: 1px;
  align-self: center;
  height: var(--footer-swatch-pill-height);
  margin: 0 var(--footer-swatch-chip-slack);
  flex-shrink: 0;
  background: var(--footer-rule-color);
}

/* A single color's swatch — its role ("Shape Fill", "Fill — Color", ...)
   plus exact hex only show in the hover tooltip (.footer-colors__tooltip),
   not as a permanent caption. Right-click toggles --marked (a batch-
   recolor selection); left-clicking any chip while others are marked
   repicks once and applies the result to the whole marked set — see
   FooterColors.jsx's pickColor. */
.footer-colors__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32.6px;
  height: 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  flex-shrink: 0;
  cursor: default;
}

.footer-colors__swatch {
  position: relative;
  width: var(--footer-swatch-pill-width);
  height: var(--footer-swatch-pill-height);
  /* Pill-shaped, matching the Copy/Paste triggers (.footer-trigger). */
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--swatch-color);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  transform-origin: center;
  transition: transform 120ms ease-out;
}

/* A stroke color is an edge on the layer, so it reads as an edge here too:
   the pill is hollow and the color is its outline (see swatchVariant in
   FooterColors.jsx). The ring lives on ::after rather than in box-shadow
   because .footer-colors__chip--marked replaces the swatch's box-shadow
   wholesale — a marked stroke chip would otherwise lose its outline and
   look like an empty slot. */
.footer-colors__swatch--stroke {
  background: transparent;
}

.footer-colors__swatch--stroke::after,
.footer-colors__swatch--hybrid::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--swatch-color);
  pointer-events: none;
}

/* Both roles at once: the outline sits over the fill. Same color on both,
   so a 1px gap in the strip's ground is what makes the ring visible at all
   — without it the two merge into a plain filled pill. */
.footer-colors__swatch--hybrid::after {
  box-shadow: inset 0 0 0 1px var(--footer-strip-bg);
}

.footer-colors__chip:hover .footer-colors__swatch {
  transform: scale(1.1);
}

/* A dark separator ring plus the accent ring outside it, rather than just
   the accent color alone — a same-hued swatch (e.g. a blue color marked,
   using the same blue accent) would otherwise make the ring nearly
   disappear into it. The dark ring guarantees contrast against the swatch
   no matter its color; the accent ring guarantees contrast against the
   panel's own dark background. */
.footer-colors__chip--marked .footer-colors__swatch {
  box-shadow:
    0 0 0 2px rgba(20, 20, 20, 0.9),
    0 0 0 4px var(--preview-group-color);
}

/* .footer-colors__chip:hover .footer-colors__swatch above has the exact
   same specificity as .footer-colors__chip--marked .footer-colors__swatch
   (two classes/pseudo-classes plus .footer-colors__swatch each), so the
   plain :hover rule — appearing later in the file — was winning outright:
   a marked chip's ring vanished the moment the mouse was over it. This
   selector also has that same specificity, so it has to come after both of
   the above in the stylesheet to win the tie; keep it last. */
.footer-colors__chip--marked:hover .footer-colors__swatch {
  box-shadow:
    0 0 0 2px rgba(20, 20, 20, 0.9),
    0 0 0 4px var(--preview-group-color);
}

/* Hover description for a swatch (role + hex) — portaled to <body> in
   FooterColors.jsx since .footer-colors clips overflow, which would
   otherwise cut off anything absolute/fixed positioned inside it.
   Position (left/top) is resolved entirely in JS, clamped to the viewport
   and flipped below the swatch when it would run off the top — no
   transform needed here any more. */
.footer-colors__tooltip {
  position: fixed;
  z-index: 1000;
  background: rgba(35, 35, 35, 0.95);
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10.5px;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.tree__children {
  transition: none !important;
}

/* ── App loader (full-panel, startup only) ── */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  opacity: 1;
  transition: opacity 0.2s ease;
  pointer-events: all;
}

.app-loader.app-loader--hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Preview grid wrapper + local loader ── */
.preview-grid-wrapper {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-anchor: none;
  overflow: hidden;
}

.preview-grid-loader {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 26, 0.7);
  opacity: 1;
  transition: opacity 0.15s ease;
  pointer-events: all;
}

.preview-grid-loader.app-loader--hidden {
  opacity: 0;
  pointer-events: none;
}

.preview-zoom-controls {
  position: fixed;
  right: 12px;
  /* Above the AI dock while it is open (App.jsx sets its height). */
  bottom: calc(59px + var(--ai-window-height, 0px));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 4px;
  border: 1px solid rgba(135, 135, 135, 0.35);
  border-radius: 999px;
  background: rgb(42, 42, 42);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  cursor: default;
}

/* Invisible extended hit zone — keeps controls visible when the mouse is
   near but not exactly on the tiny 10px track. Only active while controls
   are visible (pointer-events inherit from parent). */
.preview-zoom-controls::before {
  content: "";
  position: absolute;
  inset: -12px -6px -12px -32px;
}

.preview-zoom-controls.is-visible,
.preview-zoom-controls:hover,
.preview-zoom-controls:focus-within {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.preview-zoom-controls__value {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  min-width: 48px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f0f0f0;
  font-size: 9px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.preview-zoom-controls:hover .preview-zoom-controls__value,
.preview-zoom-controls:focus-within .preview-zoom-controls__value {
  opacity: 1;
}

.preview-zoom-controls__track {
  position: relative;
  width: 10px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.preview-zoom-controls__track::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.preview-zoom-controls__step {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  cursor: default;
  outline: none;
}

.preview-zoom-controls__step::before {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: inherit;
  background: #777777;
  transition: inset var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.preview-zoom-controls__step:hover::before,
.preview-zoom-controls__step:focus-visible::before {
  inset: 2.5px;
  background: #d8d8d8;
}

.preview-zoom-controls__step:focus,
.preview-zoom-controls__step:focus-visible,
.preview-zoom-controls__step:active {
  outline: none;
  box-shadow: none;
}

.preview-zoom-controls__step.is-active::before {
  inset: 1.5px;
  background: #ffffff;
}

.preview-zoom-controls__step.is-disabled {
  display: none;
}

.preview-zoom-controls.is-fixed {
  border-color: rgba(135, 135, 135, 0.35);
}

.preview-zoom-controls.is-fixed .preview-zoom-controls__track::before {
  background: rgba(255, 215, 97, 0.28);
}

.preview-zoom-controls.is-fixed .preview-zoom-controls__step.is-active::before {
  background: #ffd761;
}

.app-loader__spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  animation: app-loader-spin 0.7s linear infinite;
}

@keyframes app-loader-spin {
  to { transform: rotate(360deg); }
}

/* ── Auth overlay ─────────────────────────────────────────── */

.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-panel-bg);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.auth-form {
  width: 100%;
  max-width: 320px;
  padding: 28px 24px 24px;
  box-sizing: border-box;
  position: relative;
}

.auth-form__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  color: #3a95ff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-form__icon svg { width: 22px; height: 22px; }

.auth-form__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: center;
}

.auth-locked-body {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  text-align: center;
}

/* Buttons */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  outline: none;
  transition: background 0.15s, color 0.15s, transform 0.06s;
  margin-top: 6px;
}

.auth-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.auth-btn:hover { transform: scale(1.01); }
.auth-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* The same blue as MotionBoy Manager's buttons. */
.auth-btn--primary {
  background: #0b6cea;
  color: #fff;
  font-weight: 700;
}
.auth-btn--primary:hover:not(:disabled) { background: #1f7cf2; }

.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  color: #3a95ff;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-link-btn:hover { color: #7abfff; text-decoration: underline; }

/* ── User menu ────────────────────────────────────────────── */

.content__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.user-menu-wrapper {
  position: relative;
  flex: 0 0 auto;
}

.user-btn {
  position: relative;
  width: 30px;
  height: 30px;
  outline: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: background 0.1s, border-color 0.1s, color 0.1s;
  padding: 0;
}
.user-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: var(--color-text-primary);
}
.user-btn svg { width: 16px; height: 16px; pointer-events: none; }

.user-btn__badge {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-danger);
  border: 1.5px solid var(--color-panel-bg);
  pointer-events: none;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 200px;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 50;
  overflow: hidden;
}

.user-dropdown__header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.user-dropdown__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown__email {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown__divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 2px 0;
}

.user-dropdown__link {
  display: block;
  width: 100%;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--color-text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  outline: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s, color 0.1s;
}
.user-dropdown__link:hover {
  background: rgba(255,255,255,0.06);
  color: var(--color-text-primary);
}

.user-dropdown__link--update {
  color: #3a95ff;
  font-weight: 600;
}
.user-dropdown__link--update:hover {
  background: rgba(58, 149, 255, 0.12);
  color: #7abfff;
}

/* The account menu: who is signed in to MotionBoy Manager, a new pack, Open MotionBoy Manager.
   The account button's dot: green - a newer MotionBoy; blue - a new pack; none when there is neither. */
.user-btn__badge--update {
  background: #3ecf8e;
}
.user-btn__badge--new {
  background: #3a95ff;
}
/* The version row: the update item's second line, or "up to date" with a green dot. */
.user-dropdown__sub {
  display: block;
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 400;
}
.user-dropdown__version {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  color: var(--color-text-secondary);
  font-size: 11px;
}
.user-dropdown__version-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf8e;
}
.user-dropdown__header--account { display: flex; align-items: center; gap: 10px; }
.user-dropdown__avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0b6cea;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-dropdown__who { min-width: 0; }
.user-dropdown__who .user-dropdown__name,
.user-dropdown__who .user-dropdown__email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown__news {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
  transition: background 0.1s;
}
.user-dropdown__news:hover { background: rgba(255,255,255,0.06); }
.user-dropdown__link--manager { color: #4d9bff; font-weight: 600; }
.user-dropdown__link--manager:hover { background: rgba(11, 108, 234, 0.14); color: #7abfff; }

/* ── Update modal ─────────────────────────────────────────── */

.update-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-modal {
  width: 100%;
  max-width: 300px;
  padding: 24px 22px;
  box-sizing: border-box;
  background: var(--color-panel-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: 12px;
  text-align: center;
}

.update-modal__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.update-modal__body {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

/* What's new: latest.json's notes, an item a line; long ones scroll inside the box. */
.update-modal__notes {
  max-height: 180px;
  margin: -8px 0 18px;
  padding: 10px 12px;
  overflow-y: auto;
  background: var(--color-sidebar);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  text-align: left;
}

.update-modal__notes-title {
  margin-bottom: 4px;
  color: var(--color-text-primary);
  font-weight: 600;
}

.update-modal__list {
  margin: 0;
  padding-left: 16px;
}

.update-modal__list li + li {
  margin-top: 3px;
}

.update-modal__hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--color-text-muted);
}

.update-modal__later {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
}

/* ── Presets / Edit / Tools tabs (ContentHeader) and the Edit tab (EditPanel) ─
   The Edit tab lists the selected layers' parameters the footer doesn't show,
   one block per direction. The Edit and Tools tabs cover the previews, which
   stay laid out underneath (visibility, not display, so their columns and
   scroll are kept). */
.content-tabs {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: #141414;
  user-select: none;
}

.content-tabs__tab {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 10px;
  border: none;
  border-radius: 4px;
  outline: none;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.content-tabs__tab:not(:disabled):hover,
.content-tabs__tab:not(:disabled):focus-visible {
  color: var(--color-text-primary);
}

.content-tabs__tab:disabled {
  color: var(--color-text-muted);
  opacity: 0.45;
  cursor: default;
}

.content-tabs__tab.is-active {
  background: #2a2a2a;
  color: var(--color-text-primary);
}

.content-tabs__count {
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  background: #076DE4;
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
}

.content:not([data-tab="presets"]) > .content__body {
  visibility: hidden;
  /* Not rendered at all under the Edit / Tools tab: laid out and re-rendered on every step of a panel resize,
     the previews made it lag (~23 ms a step against ~5). Its state stays, the scroll position too. */
  content-visibility: hidden;
}

/* The Edit and Tools tabs (EditPanel, ToolsPanel): over the previews, under the header. */
.content-pane {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-content: start;
  gap: 10px;
  padding: 4px 10px 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--color-panel-bg);
  scrollbar-width: none;
}

.content-pane::-webkit-scrollbar {
  display: none;
}

/* The Tools tab: as many columns as its slider says (ToolsPanel, PreviewZoomControls), like the previews. */
/* Two cards side by side while each gets 210px (Magic's buttons need that much), else stacked; auto-fit
   lets the two fill the pane instead of leaving empty tracks. */
.content-pane.tools-panel {
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
}

/* The Edit tab: the Colors card on top, the whole width, then the presets' cards in a grid of their own. They
   share its width, 240px each at least: auto-fit drops the columns no card fills (the previews' auto-fill
   kept them, and a wide pane left empty tracks beside the cards; a card spanning every column, as the Colors
   one would in the same grid, keeps them all too). A card is as tall as its rows. */
.content-pane.edit-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.content-pane.edit-panel > * {
  flex: 0 0 auto;
}

.edit-panel__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  align-items: start;
  gap: 10px;
}

.edit-panel__empty {
  padding: 24px 0;
  color: var(--color-text-muted);
  font-size: 12px;
  text-align: center;
}

/* No width cap: the presets' cards fill their row, so their edges meet the Colors card's above at any width. */
.edit-panel__section {
  min-width: 0;
  border: 1px solid #000000;
  background: #222222;
}

.edit-panel__title {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  /* 3px on the right: its buttons (18px wide) stand over the rows' reset buttons, centred 13px from the edge. */
  padding: 0 3px 0 8px;
  border-bottom: 1px solid #000000;
  background: #171717;
  font-size: 11px;
  user-select: none;
}

.edit-panel__direction {
  flex: 0 0 auto;
  color: var(--color-text-primary);
  font-weight: 600;
}

.edit-panel__name {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The preset's name: a link to it in the tree, as in the footer's column title. */
.edit-panel__name-link {
  display: inline-flex;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* Underlined on hover, like the footer column title's link was (.footer-fields__title-label:hover). */
.edit-panel__name-link:hover .edit-panel__name,
.edit-panel__name-link:focus-visible .edit-panel__name {
  color: var(--color-text-primary);
  text-decoration: underline;
}

/* The footer columns' title actions (mirror, Add marker and its trash), at the title's right end. */
.edit-panel__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* The Effect card's marker control (EffectMarkerShift): a small MB Effect marker as AE's timeline draws one
   with a duration - the head (the start), its bar, the tab at the end (the end). The head and the tab drag
   sideways (blue under the mouse); the bar stretches inside the control's own box, never over the buttons
   beside it, and springs back on the release. How far shows in a small tag under the dragged side. */
.effect-marker-shift {
  position: relative;
  flex: 0 0 auto;
  width: 74px;
  height: 18px;
  margin-right: 2px;
  border-radius: 3px;
  user-select: none;
  touch-action: none;
  transition: background var(--transition-fast);
}

.effect-marker-shift:hover,
.effect-marker-shift[data-dragging] {
  background: rgba(255, 255, 255, 0.04);
}

.effect-marker-shift__bar {
  position: absolute;
  top: 6px;
  height: 6px;
  border-radius: 0 2px 2px 0;
  background: rgba(205, 205, 205, 0.32);
  pointer-events: none;
  transition: left 0.12s ease-out, width 0.12s ease-out, background var(--transition-fast);
}

.effect-marker-shift[data-dragging] .effect-marker-shift__bar {
  background: rgba(45, 140, 235, 0.38);
}

.effect-marker-shift__grip {
  position: absolute;
  top: 0;
  height: 18px;
  color: #cfcfcf;
  cursor: ew-resize;
  transition: left 0.12s ease-out, color var(--transition-fast);
}

.effect-marker-shift__grip--start {
  width: 12px;
}

.effect-marker-shift__grip--end {
  width: 10px;
}

/* While dragged, the bar and the sides follow the mouse without easing. */
.effect-marker-shift[data-dragging] .effect-marker-shift__bar,
.effect-marker-shift[data-dragging] .effect-marker-shift__grip {
  transition: color var(--transition-fast), background var(--transition-fast);
}

.effect-marker-shift__grip:hover,
.effect-marker-shift__grip[data-active] {
  color: #2d8ceb;
}

.effect-marker-shift__head {
  position: absolute;
  left: 2px;
  top: 3px;
  display: block;
  width: 8px;
  height: 12px;
}

.effect-marker-shift__tab {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 2px;
  height: 10px;
  border-radius: 1px;
  background: currentColor;
}

/* How far the dragged side has gone, under it (AE's own tags: dark, square, light text). */
.effect-marker-shift__delta {
  position: absolute;
  top: calc(100% + 3px);
  z-index: 5;
  transform: translateX(-50%);
  padding: 1px 4px;
  border: 1px solid #3c3c3c;
  background: #101010;
  color: #e6e6e6;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 13px;
  white-space: nowrap;
  pointer-events: none;
}

/* A card's fold button (EditPanel FoldButton), the last of the title's actions: a chevron in a square, over
   the rows' reset buttons. */
.edit-panel__fold {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  outline: none;
  background: #222222;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.edit-panel__fold:hover,
.edit-panel__fold:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  background: #2b2b2b;
  color: var(--color-text-primary);
}

.edit-panel__fold-icon {
  display: block;
  width: 10px;
  height: 10px;
  transition: transform var(--transition-fast);
}

/* Folded: the title alone, its chevron turned right as on the Tools cards; the card's own border closes it. */
.edit-panel__section[data-folded] .edit-panel__fold-icon {
  transform: rotate(-90deg);
}

.edit-panel__section[data-folded] > .edit-panel__title {
  border-bottom: 0;
}

.edit-panel__section[data-folded] > :not(.edit-panel__title) {
  display: none !important;
}

/* The footer's panel of parameters and colours is hidden: the Edit tab has them (store footerPanelShown). */
.footer-fields-wrapper[data-panel-hidden] {
  display: none !important;
}

.edit-panel__rows .control-group {
  height: 25px;
}

.edit-panel__rows .control-group:first-child {
  border-top: none;
}

/* The label column: as wide as the widest label of all the cards (--edit-label-width, EditPanel), so every
   card's values start on one line, as in AE's Effect Controls; 45% of the row at most. The label gives way
   (down to its min-width, then an ellipsis) when the value needs the room: an Edit column is narrow, and
   Position's "X: -864 px Y: 0 px" didn't fit beside a 45% label. */
.edit-panel__rows .control-group__label {
  flex: 0 1 min(var(--edit-label-width, 45%), 45%);
  overflow: hidden;
  color: var(--color-text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The value is never narrower than its fields, and keeps the reset button's 18px and a 4px gap free: the
   button sits over the right end of the value (position: absolute; right: 0), where the last "px" went
   under it. */
.edit-panel__rows .control-group__value {
  flex: 1 0 auto;
  padding-right: 22px;
}

/* The label column a grid column of the card's, its rows subgrids of it. Without subgrid (Safari before 16)
   the flex layout above stays. */
@supports (grid-template-columns: subgrid) {
  .edit-panel__rows {
    display: grid;
    grid-template-columns: minmax(0, min(var(--edit-label-width, 45%), 45%)) minmax(0, 1fr);
  }

  .edit-panel__rows .control-group:not(.is-hidden) {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
  }

  .edit-panel__rows .control-group__label {
    min-width: 0;
    padding-right: 10px;
  }

}

/* Each row's values from the label column's edge, with no room to spare: the fields as wide as their digits
   (useFooterFieldSync updateFooterFieldWidth: 2ch at least here, 3ch in the footer), a unit right after its
   number, Rotation's turns no wider than theirs. A single value (Bounces, Decay...) fills the row - it is
   dragged anywhere on it - its number at the left too. */
.edit-panel__rows .control-group__inputs {
  justify-content: flex-start;
  gap: 3px;
}

.edit-panel__rows .control-group[data-footer-group] .control-group__input {
  min-width: 0;
  text-align: left;
}

.edit-panel__rows .control-group[data-footer-group] .control-group__input--turns {
  flex: 0 0 auto;
  text-align: left !important;
}

.edit-panel__rows .control-group__turns-sep {
  margin: 0 1px;
}

/* Position's Y after X's "px": a little more than the 3px between a number and its unit. */
.edit-panel__rows .control-group__axis--y {
  margin-left: 4px;
}

/* The Edit tab's Colors card (EditPanel: the footer's FooterColors): at the top, the whole width; one row
   like the parameter rows, the swatches from its left edge - the first pill under the title's "Colors" (8px
   in; a chip is 1px wider than its pill). The card's title says what it is - the footer's label cell (the
   layer's name, "2 layers") goes; a swatch's tooltip names its layers. */
.edit-panel__section--colors .footer-colors {
  --footer-strip-bg: #0E0E0E;
  border-top: 0;
  max-height: none;
}

.edit-panel__section--colors .footer-colors__layer {
  display: none;
}

.edit-panel__section--colors .footer-colors__swatches {
  justify-content: flex-start;
  padding: 4px var(--footer-swatch-inset) 4px 7px;
}

/* An on/off parameter (EffectSection RowGroup, kind "checkbox"): slot 1 of a "Pseudo/MBnnC-" effect. */
.control-group__checkbox {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  border: 1px solid #5a5a5a;
  border-radius: 3px;
  background: transparent center / 9px 9px no-repeat;
  cursor: pointer;
}

.control-group__checkbox:hover,
.control-group__checkbox:focus-visible {
  border-color: #076DE4;
  outline: none;
}

.control-group__checkbox:checked {
  border-color: #076DE4;
  background-color: #076DE4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2l2 2L8 3' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* The selected layers disagree. */
.control-group__checkbox:indeterminate {
  border-color: #076DE4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 5h5' stroke='%23076DE4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

.control-group__checkbox.is-hidden {
  display: none;
}

/* The footer's auto-sync button is off (Footer.jsx data-sync-off): its fields stay hidden, also while
   the field engine keeps them filled for the open Edit tab. */
.footer-fields-wrapper[data-sync-off] .footer-fields-row {
  display: none !important;
}

/* ── The AI dock (AiDock, for the accounts with MotionBoy AI) ────────────────
   Across the bottom of the panel, over the tree and the previews (which pad their last rows clear of it): one
   card - what is attached (tiles), the request (or, once sent, its answer in the same place), a row of pills
   ending in Send. A preview or a folder dragged onto it is attached to the next request. The panel's own
   colours: AE's grays, MotionBoy's blue. */
/* The AI chat: MotionBoy AI's tool window in the panel (ai-chat--window), or the whole of its own panel
   (ai-chat--page, AiPanel.jsx) */
.ai-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  container-type: inline-size;
}

.ai-icon {
  width: 14px;
  height: 14px;
  flex: none;
  display: block;
}

/* The answer, in the box where the request was written: the request on top, then the progress, the steps and
   the words, scrolling inside the box's own height */
.ai-reply {
  grid-area: reply;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin-bottom: 6px;
}

.ai-reply__ask {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #8a8a8a;
  font-size: 11px;
}

.ai-reply__request {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-reply__close {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
}

.ai-reply__close:hover {
  background: #333;
  color: #e6e6e6;
}

.ai-reply__close .ai-icon {
  width: 11px;
  height: 11px;
}

/* About four lines: the box grows a little with the answer, which scrolls inside it. */
.ai-reply__body {
  max-height: 84px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
  color: #e6e6e6;
  font-size: 12px;
  line-height: 1.45;
  user-select: text;
}

.ai-reply__notice {
  color: #c9a45c;
}

.ai-reply__error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #e58a90;
}

.ai-msg__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-msg__para {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-code {
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: #121212;
  border: 1px solid var(--color-border);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}

.ai-btn {
  height: 24px;
  padding: 0 11px;
  border: 1px solid var(--color-border-strong);
  border-radius: 7px;
  background: #2a2a2a;
  color: var(--color-text-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ai-btn:hover:not(:disabled) {
  background: #333;
}

.ai-btn:disabled {
  background: #2c2c2c;
  border-color: transparent;
  color: #6a6a6a;
  cursor: default;
}

/* A script Claude ran, as a step (no code) */
.ai-step {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9a9a9a;
  font-size: 11px;
}

.ai-step__icon {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #262626;
}

.ai-step__icon .ai-icon {
  width: 11px;
  height: 11px;
}

.ai-step[data-status="ok"] .ai-step__icon {
  color: #7fcf8a;
}

.ai-step[data-status="failed"] .ai-step__icon {
  color: #e58a90;
}

.ai-step[data-status="running"] {
  color: #cfcfcf;
}

.ai-spinner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #4a9df8;
  animation: ai-spin 0.8s linear infinite;
}

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

/* The composer: a card in a darker rim */
.ai-composer-frame {
  padding: 3px;
  border-radius: 16px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.ai-composer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "warn warn"
    "reply reply"
    "tiles tiles"
    "pics pics"
    "box box"
    "bar send";
  column-gap: 6px;
  /* no row gap: the warning and tiles rows are mostly empty, and a gap would still stand for them; each part
     keeps its own space below instead */
  row-gap: 0;
  padding: 7px 7px 7px 10px;
  border-radius: 13px;
  background: #262626;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-medium), outline-color var(--transition-medium);
}

.ai-composer.is-drag-active {
  outline: 1.5px dashed rgba(74, 157, 248, 0.6);
  outline-offset: -5px;
}

.ai-composer.is-drag-over {
  background: #252d38;
  outline: 1.5px solid #4a9df8;
}

.ai-composer__drop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: rgba(22, 38, 60, 0.94);
  color: #cfe4ff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

.ai-composer__warning {
  grid-area: warn;
  margin-bottom: 5px;
  color: #e58a90;
}

.ai-composer__box {
  grid-area: box;
  display: block;
  width: 100%;
  min-height: 20px;
  margin: 2px 0 6px;
  padding: 1px 2px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: #e8e8e8;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  user-select: text;
}

.ai-composer__box::placeholder {
  color: #707070;
}

.ai-composer__box:disabled {
  cursor: default;
}

/* One row, never wrapped: +, the model, Start over (the context is in the + menu). Not clipped: the + menu
   opens above it. */
.ai-composer__bar {
  grid-area: bar;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ai-pill {
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #313131;
  color: #c9c9c9;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.ai-pill:hover {
  background: #3a3a3a;
  color: #ffffff;
}

.ai-pill[aria-pressed="true"],
.ai-pill[aria-expanded="true"] {
  background: rgba(6, 108, 227, 0.2);
  border-color: rgba(74, 157, 248, 0.6);
  color: #9cc8ff;
}

.ai-pill--icon {
  width: 24px;
  padding: 0;
  justify-content: center;
}

.ai-pill:disabled,
.ai-pill:disabled:hover {
  background: #2c2c2c;
  color: #6a6a6a;
  cursor: default;
}

/* How many kinds of context were added by hand, on the + */
.ai-pill--icon.has-context {
  position: relative;
  color: #9cc8ff;
}

/* Send (and Ask over an answer): a round blue button with an arrow, at the end of the bar; dim when there is
   nothing to send */
.ai-send {
  grid-area: send;
  align-self: end;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #1a7ff0;
  color: #ffffff;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.ai-send .ai-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.ai-send:hover:not(:disabled) {
  background: #3a95ff;
}

.ai-send:active:not(:disabled) {
  transform: scale(0.94);
}

.ai-send:disabled {
  background: #333333;
  color: #6a6a6a;
  cursor: default;
}

.ai-send[data-busy] {
  background: #333333;
  color: #9a9a9a;
}

@keyframes ai-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* The header's AI button: on while the dock is open */
.content-tabs__ai {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.content-tabs__ai svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.content-tabs__ai.is-on {
  background: rgba(6, 108, 227, 0.2);
  color: #9cc8ff;
}

/* A narrow panel: the pills keep their icons only. */
@container (max-width: 470px) {
  .ai-pill__label {
    display: none;
  }

  .ai-pill:not(.ai-pill--model) {
    width: 26px;
    padding: 0;
    justify-content: center;
  }
}

/* ── The footer's tool windows (ToolWindows: Frame, Directions, Shift) ──────────
   Inside the panel, as the plug-in's own panels look (MbPanelViews.cpp): a row in the bottom-right corner, the
   first opened rightmost, or floating where one was dragged. A title bar to drag, Detach (out to After Effects as
   the plug-in's panel) and Close. */
/* One line, never wrapped: on a narrow panel the windows go over one another (ToolWindows: over). */
.tool-windows__row {
  position: absolute;
  z-index: 11;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  align-items: flex-end;
  pointer-events: none;
}

.tool-window {
  flex: none;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #191919;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

body.is-dragging-tool-window,
body.is-dragging-tool-window * {
  cursor: grabbing !important;
  user-select: none !important;
}

/* Where a dragged window would snap into the corner's row */
.tool-window__place {
  flex: none;
  box-sizing: border-box;
  border: 1px dashed rgba(0, 120, 255, 0.7);
  border-radius: 10px;
  background: rgba(0, 120, 255, 0.08);
}

.tool-window.is-snapping {
  opacity: 0.75;
}

.tool-window.is-floating {
  position: absolute;
  z-index: 12;
}

.tool-window__title {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 4px 0 9px;
  background: #222222;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: grab;
  touch-action: none;
}

.tool-window__title:active {
  cursor: grabbing;
}

.tool-window__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #9a9a9a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-window__btn {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
}

.tool-window__btn:hover {
  background: #333;
  color: #f1f5ff;
}

.tool-window--shift .tool-window__body {
  background: #1f1f1f;
}

/* Directions and Frame: a 3x3 grid of 30px cells, 5px apart, 8px in */
.tool-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.tool-tabs {
  display: flex;
  gap: 5px;
}

.tool-radio {
  width: 47px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: #1a1a1a;
  color: #bdbdbd;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.tool-radio:hover {
  background: #252525;
  border-color: rgba(255, 255, 255, 0.42);
  color: #d8d8d8;
}

.tool-radio[aria-pressed="true"],
.tool-radio[aria-pressed="true"]:hover {
  background: #151515;
  border-color: rgba(255, 255, 255, 0.1);
  color: #0078ff;
}

.tool-cells {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  gap: 5px;
}

.tool-cell {
  position: relative;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: #242424;
  color: #c0c0c0;
  cursor: pointer;
}

.tool-cell:hover {
  background: #2e2e2e;
  border-color: rgba(255, 255, 255, 0.2);
  color: #e0e0e0;
}

.tool-cell:active {
  background: #333333;
}

.tool-cell[data-flash="ok"] {
  border-color: #4db87a;
  color: #4db87a;
  background: rgba(77, 184, 122, 0.1);
}

.tool-cell[data-flash="err"] {
  border-color: #d8624f;
  color: #d8624f;
  background: rgba(216, 98, 79, 0.1);
}

.tool-cell--anchor {
  border-radius: 10px;
  background: #252525;
  color: #b0b0b0;
}

.tool-cell--anchor svg {
  position: absolute;
  width: 8px;
  height: 8px;
}

.tool-cell--center {
  color: #066ce3;
}

.tool-cell--center:hover {
  color: #3a96f8;
  border-color: rgba(6, 108, 227, 0.35);
  background: rgba(6, 108, 227, 0.08);
}

/* Shift: three sections, 10px in, a thin line between them */
.shift-tool {
  width: 210px;
  display: flex;
  flex-direction: column;
  padding: 3px 10px 8px;
}

.shift-tool__section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 7px 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shift-tool__section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.shift-tool__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 27px;
}

.shift-tool__label {
  color: #bdbdbd;
  font-size: 12px;
}

.tool-tabs--small .tool-radio {
  width: 44px;
  height: 27px;
  border-radius: 6px;
  font-size: 12px;
}

.shift-target {
  position: relative;
}

.shift-target__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #bdbdbd;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}

.shift-target__trigger:hover,
.shift-target__trigger[aria-expanded="true"] {
  color: #f1f5ff;
}

.shift-target__menu {
  position: absolute;
  left: 0;
  top: 23px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 115px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6.5px;
  background: #1a1a1a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.shift-target__option {
  height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 4.5px;
  background: transparent;
  color: #bdbdbd;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.shift-target__option:hover {
  background: #252525;
  color: #f1f5ff;
}

.shift-target__option[aria-selected="true"] {
  color: #0078ff;
}

.shift-row {
  display: flex;
  align-items: stretch;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6.5px;
  background: #222222;
}

.shift-row__arrow {
  width: 34px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #bdbdbd;
  cursor: pointer;
}

.shift-row__arrow:hover {
  color: #f1f5ff;
}

.shift-time {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0078ff;
  font-size: 12px;
  cursor: ew-resize;
  touch-action: none;
}

.shift-time__text i {
  margin: 0 2px 0 0.5px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 7px;
  font-style: normal;
}

.shift-time--edit {
  width: 100%;
  border: 0;
  outline: none;
  background: #232323;
  color: #0078ff;
  font-family: inherit;
  text-align: center;
  cursor: text;
}

.shift-tool__buttons {
  display: flex;
  gap: 4.5px;
}

.shift-tool__icon-btn {
  width: 38.5px;
  height: 25.5px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5.5px;
  background: #252525;
  color: #bdbdbd;
  cursor: pointer;
}

.shift-tool__icon-btn:hover {
  background: #303030;
  border-color: rgba(255, 255, 255, 0.34);
  color: #f1f5ff;
}

.shift-tool__icon-btn:active {
  background: #333333;
}

.shift-stepper {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 25.5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5.5px;
  background: #1f1f1f;
}

.shift-stepper:hover {
  border-color: rgba(255, 255, 255, 0.34);
}

.shift-stepper__btn {
  width: 14px;
  height: 100%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #bdbdbd;
  cursor: pointer;
}

.shift-stepper__btn:hover {
  color: #f1f5ff;
}

.shift-stepper__input {
  flex: 1;
  width: 0;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #bdbdbd;
  font-family: inherit;
  font-size: 11px;
  text-align: center;
}

.shift-stepper[data-bad] .shift-stepper__input {
  color: #e05252;
}

.shift-tool__align {
  flex: 1;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5.5px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5.5px;
  background: #303030;
  color: #bdbdbd;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.shift-tool__align:hover {
  border-color: rgba(255, 255, 255, 0.34);
  color: #f1f5ff;
}

/* ── The AI answer as blocks (2026-11-11) ──────────────────────────────────────
   The request in a dark strip across the top of the box (two lines at most), then the answer's blocks: each
   step Claude took in After Effects (Repeat, Ask about it), its words as a short note (More, Copy), the progress. */
.ai-composer[data-mode="reply"] .ai-reply__ask {
  align-items: flex-start;
  margin: -7px -7px 7px -10px;
  padding: 7px 8px 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px 12px 0 0;
  background: #1c1c1c;
}

.ai-composer[data-mode="reply"] .ai-reply__request {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #ececec;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

/* its scroll bar's room kept: the bar coming and going no longer moves the blocks */
.ai-composer[data-mode="reply"] .ai-reply__body {
  scrollbar-gutter: stable;
  padding-right: 0;
  overflow-anchor: none;
  max-height: 148px;
  gap: 4px;
}

.ai-block {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 3px 4px 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  background: #2f2f2f;
}

.ai-block.ai-step {
  color: #d8d8d8;
  font-size: 12px;
}

.ai-step__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ai-step__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-step__why {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c97f86;
  font-size: 10.5px;
}

.ai-step__why.is-ok {
  color: #6fbf8a;
}

.ai-block .ai-step__icon {
  background: #262626;
}

/* The answer's end as a result, not a message: one line with a spark, its words in a soft gradient, rising in;
   a question in warm colours. Each finished step's check pops. */
.ai-composer[data-mode="reply"] .ai-reply__ask {
  position: relative;
}

.ai-step[data-status="ok"] .ai-step__icon,
.ai-step[data-status="failed"] .ai-step__icon {
  animation: ai-pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes ai-pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* The result: a ring, the result in a few words, steps · time · Show; the next things to do as buttons */
.ai-result {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: ai-rise 0.35s ease-out;
}

/* opacity only: a move would push the content past the body's edge for a moment, and its scroll bar blinked */
@keyframes ai-rise {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes ai-ring-close {
  from { stroke-dashoffset: 81.7; }
}

@keyframes ai-ring-spin {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

.ai-result__meta {
  color: #7d7d7d;
  font-size: 10.5px;
}

/* Back to an earlier request: arrows and "2 / 5" in the request's strip */
.ai-reply__nav {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.ai-reply__pos {
  min-width: 30px;
  color: #7d7d7d;
  font-size: 10.5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ai-reply__close:disabled {
  opacity: 0.35;
  cursor: default;
  background: transparent;
}

.ai-reply__body .ai-block,
.ai-reply__body .ai-step__icon {
  contain: paint;
}

.ai-composer[data-mode="reply"] .ai-reply__body {
  max-height: min(320px, 55vh);
}

/* Stop, while a request is under way: a light round button with a dark square */
.ai-send.ai-send--stop {
  background: #e8e8e8;
  color: #1a1a1a;
}

.ai-send.ai-send--stop:hover:not(:disabled) {
  background: #ffffff;
}

.ai-send.ai-send--stop:disabled {
  background: #555555;
}

.ai-send__stop {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: currentColor;
}

/* New chat, in the request's strip */
.ai-reply__new {
  flex: none;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #262626;
  color: #cfcfcf;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.ai-reply__new:hover:not(:disabled) {
  background: #333;
  color: #fff;
}

.ai-reply__new:disabled {
  opacity: 0.45;
  cursor: default;
}

.ai-reply__new .ai-icon {
  width: 11px;
  height: 11px;
}

/* The box under an answer: a line between them */
.ai-composer[data-mode="reply"] .ai-composer__box {
  margin-top: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* The box to write in, over its mentions' marks: both in one grid cell, the same text metrics, so the marks
   sit under the words the box draws ([Fade In], [Ease (folder)]) */
.ai-box {
  grid-area: box;
  display: grid;
  min-width: 0;
  margin: 2px 0 6px;
}

.ai-box > .ai-composer__box,
.ai-box > .ai-box__marks {
  grid-area: 1 / 1;
  margin: 0;
}

.ai-box > .ai-composer__box {
  position: relative;
  background: transparent;
}

.ai-box__marks {
  min-width: 0;
  padding: 1px 2px;
  overflow: hidden;
  color: transparent;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  pointer-events: none;
}

.ai-box__marks mark {
  border-radius: 4px;
  background: rgba(6, 108, 227, 0.3);
  box-shadow: 0 0 0 1px rgba(74, 157, 248, 0.5);
  color: transparent;
}

/* a picture named in the words ([Picture 1]): its number on its preview in the tray */
.ai-picture__n {
  position: absolute;
  left: 3px;
  bottom: 3px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: rgba(6, 108, 227, 0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}

/* under an answer: the line between them on the box's wrapper */
.ai-composer[data-mode="reply"] .ai-box {
  margin-top: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-composer[data-mode="reply"] .ai-box > .ai-composer__box {
  padding-top: 1px;
  border-top: 0;
}

.ai-pill--icon.is-pro {
  color: #9cc8ff;
}

/* Pro: the answer as a chat - Claude's words as paragraphs, its steps, variants and controls where it called
   them, the status while it works */
.ai-result--pro {
  gap: 7px;
}

.ai-pro__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #e2e2e2;
  font-size: 12.5px;
  line-height: 1.5;
  user-select: text;
}

.ai-pro__list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-pro__status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9a9a9a;
  font-size: 11.5px;
}

.ai-pro__meta {
  margin-top: -2px;
}

/* Mentions as soft pills: the box's own text is transparent (its caret and selection stay), the layer under
   it draws the words - a mention in light blue on a faint blue, its brackets there (the same metrics) but not
   seen, so they read as the pill's edges */
.ai-box > .ai-composer__box {
  color: transparent;
  caret-color: #e8e8e8;
}

.ai-box > .ai-composer__box::selection {
  background: rgba(45, 140, 235, 0.45);
  color: transparent;
}

.ai-box__marks {
  color: #e8e8e8;
}

.ai-box__marks mark {
  border-radius: 5px;
  background: rgba(74, 157, 248, 0.15);
  box-shadow: none;
  color: #a9cdff;
}

.ai-mention__br {
  color: transparent;
}

/* The marks under the box match its text exactly: the page's letter-spacing (0.11px) moved the drawn words
   away from the caret, half a letter on a long line */
.ai-box__marks,
.ai-box__marks mark,
.ai-box > .ai-composer__box {
  letter-spacing: normal;
  word-spacing: normal;
}

/* Pro: the thinking before the words - muted, its first lines, the rest with a click */
.ai-pro__thinking {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 9px;
  border: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 7px 7px 0;
  background: rgba(255, 255, 255, 0.025);
  color: #8f8f8f;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.ai-pro__thinking-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a8a8a8;
  font-size: 11px;
  font-weight: 600;
}

.ai-pro__thinking-head .ai-icon {
  width: 11px;
  height: 11px;
}

.ai-pro__thinking-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: pre-wrap;
  font-size: 11.5px;
  font-style: italic;
  line-height: 1.45;
}

.ai-pro__thinking.is-open .ai-pro__thinking-text {
  display: block;
}

/* Pro, while Claude thinks: its thinking as it streams - a few lines, the newest in view */
.ai-pro__thinking {
  cursor: default;
}

.ai-pro__thinking .ai-spinner {
  width: 9px;
  height: 9px;
}

.ai-pro__thinking-text,
.ai-pro__thinking.is-live .ai-pro__thinking-text {
  display: block;
  max-height: calc(11.5px * 1.45 * 4);
  overflow: hidden;
  -webkit-line-clamp: unset;
}

/* The request's strip: the words' first line centred on the 22px row (PRO, the arrows, New chat), a second
   line under it */
.ai-composer[data-mode="reply"] .ai-reply__request {
  padding: 2px 0;
  line-height: 18px;
}

.ai-composer[data-mode="reply"] .ai-reply__ask > .ai-reply__nav {
  align-self: flex-start;
  height: 22px;
}

/* The user's pictures: the tray over the box (each with its x), and small in the request's strip */
.ai-pictures {
  grid-area: pics;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 2px;
}

.ai-picture {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111111;
  overflow: hidden;
}

.ai-picture img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ai-picture__x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}

.ai-picture:hover .ai-picture__x,
.ai-picture__x:focus-visible {
  opacity: 1;
}

.ai-picture__x .ai-icon {
  width: 10px;
  height: 10px;
}

.ai-reply__pictures {
  flex: none;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.ai-reply__pictures img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.ai-reply__more {
  color: #9a9a9a;
  font-size: 10.5px;
  font-weight: 600;
}

/* A narrow dock: Send stays on top and clickable whatever the bar holds; the model's pill keeps its icon, Lite /
   Pro tighten - and on a very narrow one become L / P, the pills 24px */
.ai-send {
  position: relative;
  z-index: 3;
}

@container (max-width: 300px) {
  .ai-composer__bar {
    gap: 3px;
  }

  .ai-composer__bar .ai-pill {
    width: 24px;
  }

}

/* The folder open in the tree: its name in a row under the tabs, over the previews (where the path was) */
.content__folder {
  flex: none;
  min-width: 0;
  padding: 0 12px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  user-select: none;
}

/* The bar holds only "+" (a picture), at the right beside Send */
.ai-composer__bar {
  justify-content: flex-end;
}

/* The credits used: a ring beside "+" (as in Claude's apps), its card on a click */
.ai-credits {
  position: relative;
  display: inline-flex;
  flex: none;
}

.ai-credits__btn {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.ai-credits__btn:hover {
  background: #313131;
}

.ai-credits__btn svg {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}

.ai-credits__track,
.ai-credits__fill {
  fill: none;
  stroke-width: 2.2;
}

.ai-credits__track {
  stroke: #3d3d3d;
}

.ai-credits__fill {
  stroke: #4a9df8;
  stroke-linecap: round;
}

.ai-credits__btn[data-level="mid"] .ai-credits__fill {
  stroke: #e0b04f;
}

.ai-credits__btn[data-level="high"] .ai-credits__fill {
  stroke: #ef6b6b;
}

.ai-credits__card {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 3;
  width: 190px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #2a2a2a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.ai-credits__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: #9a9a9a;
  font-size: 11.5px;
}

.ai-credits__head b {
  color: #e8e8e8;
  font-weight: 600;
}

.ai-credits__bar {
  height: 4px;
  border-radius: 2px;
  background: #3d3d3d;
  overflow: hidden;
}

.ai-credits__bar > span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: #4a9df8;
}

/* The buttons (the credits, "+", Send) on the line of the words, not a row of their own under them: no empty
   row under the box; with more lines the buttons stay at the bottom right */
.ai-composer {
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "warn warn warn"
    "reply reply reply"
    "tiles tiles tiles"
    "pics pics pics"
    "box bar send";
}

.ai-composer > .ai-box {
  margin: 0;
  align-self: center;
}

.ai-composer > .ai-composer__bar {
  align-self: end;
}

/* in a reply, the line over the box goes across the whole dock (the buttons are on the box's line now) */
.ai-composer[data-mode="reply"] > .ai-box {
  padding-top: 0;
  border-top: 0;
}

.ai-composer[data-mode="reply"] > .ai-reply {
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* In the tool window: the window is the frame */
.ai-chat--window {
  width: min(360px, calc(100vw - 32px));
}

.ai-chat--window .ai-composer-frame {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ai-chat--window .ai-composer {
  border-radius: 0;
}

/* Its own panel: the chat over all of it, the answer taking the room the box leaves */
.ai-panel {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--color-panel-bg, #232323);
}

.ai-panel__note {
  margin: auto;
  max-width: 260px;
  color: #9a9a9a;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* The chat at the panel's foot, as tall as it needs: the conversation grows it upward, up to the whole panel
   (then it scrolls inside); the earlier chats in the room above it */
.ai-chat--page {
  flex: 1;
  min-height: 0;
  gap: 8px;
}

.ai-chat--page .ai-composer-frame {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

.ai-chat--page .ai-composer {
  flex: 0 1 auto;
  min-height: 0;
  grid-template-rows: auto minmax(0, auto) auto auto auto auto;
}

.ai-chat--page .ai-reply {
  min-height: 0;
  overflow: hidden;
}

.ai-chat--page .ai-composer[data-mode="reply"] .ai-reply__body {
  flex: 0 1 auto;
  min-height: 0;
  max-height: none;
}

/* The earlier conversations: a list in the room the chat leaves (none: the room stays empty) */
.ai-history {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-history__head {
  flex: none;
  padding: 2px 8px 6px;
  color: #8a8a8a;
  font-size: 11px;
  font-weight: 600;
}

.ai-history__list {
  flex: 0 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.ai-history__list::-webkit-scrollbar {
  width: 6px;
}

.ai-history__list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}

.ai-history__item {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 8px;
}

.ai-history__item:hover {
  background: #2c2c2c;
}

.ai-history__open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 28px 5px 8px;
  border: 0;
  background: none;
  color: #d6d6d6;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.ai-history__open:disabled {
  opacity: 0.5;
  cursor: default;
}

.ai-history__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ai-history__when {
  flex: none;
  color: #7a7a7a;
  font-size: 10.5px;
}

.ai-history__x {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: none;
  color: #9a9a9a;
  cursor: pointer;
  transform: translateY(-50%);
}

.ai-history__item:hover .ai-history__x {
  display: flex;
}

.ai-history__item:hover .ai-history__when {
  visibility: hidden;
}

.ai-history__x:hover {
  background: #3a3a3a;
  color: #fff;
}

.ai-history__x .ai-icon {
  width: 11px;
  height: 11px;
}

/* MotionBoy AI's window: across the panel's bottom (the others above it), its left edge to drag for the width */
.tool-window--ai.is-bottom {
  position: absolute;
  z-index: 10;
}

.tool-window--ai .tool-window__title {
  cursor: default;
}

.tool-window__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  z-index: 2;
  cursor: ew-resize;
}

.tool-window__edge:hover,
body.is-resizing-ai-window .tool-window__edge {
  background: linear-gradient(90deg, rgba(74, 157, 248, 0.45) 0 2px, transparent 2px);
}

body.is-resizing-ai-window {
  cursor: ew-resize;
  user-select: none;
}

.ai-chat--window {
  width: auto;
}

/* The conversation as in an AI app: the requests on the right, the answers under them */
.ai-reply__top {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 4px;
}

.ai-turn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 6px;
}

.ai-turn + .ai-turn {
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ai-msg--user {
  align-self: flex-end;
  max-width: 85%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 12px;
  background: #333333;
  color: #f0f0f0;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}

.ai-msg__pictures {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.ai-msg__pictures img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}

/* The AI window: as tall as its conversation, up to this; while Claude answers it keeps the height it had when
   the request went (AiChat.jsx holds it) and the answer scrolls inside */
/* about three lines: the answers are that short (the site's prompt, AiPrompt::LENGTH); more scrolls */
.ai-chat--window .ai-composer[data-mode="reply"] .ai-reply__body {
  max-height: 60px;
}

/* text going out of view fades softly at that edge (AiChat.jsx sets the classes) */
.ai-chat--window .ai-reply__body.is-clipped-top {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22px);
}

.ai-chat--window .ai-reply__body.is-clipped-bottom {
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 22px);
  mask-image: linear-gradient(to top, transparent 0, #000 22px);
}

.ai-chat--window .ai-reply__body.is-clipped-top.is-clipped-bottom {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}

/* Claude's thinking in the window: its newest lines as they come (the block follows the end), older ones fading
   out at the top */
.ai-chat--window .ai-pro__thinking-text {
  display: block;
  max-height: calc(1.45em * 5);
  overflow: hidden;
}

.ai-chat--window .ai-pro__thinking-text.is-overflowing {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 1.6em);
  mask-image: linear-gradient(to bottom, transparent 0, #000 1.6em);
}

/* Windows standing in the corner's row and the AI window under them: a short shadow, none of it reaching the
   window below (8px apart); the long one only for a window dragged out over the panel */
.tool-windows__row .tool-window,
.tool-window--ai.is-bottom {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* MotionBoy AI's button beside Delete */
.footer-actions__group--end {
  gap: 6px;
}

/* The Tools window (the footer's hammer): the Multiply / Divide stepper, then Split text's modes */
.tools-window {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: max-content;
  padding: 7px 8px 4px;
}

.tools-window .footer-scale-stepper {
  align-self: flex-start;
}

.tools-window .footer-menu--inline {
  position: static;
  width: 100%;
  min-width: 0;
  /* a thin line between the stepper and Split text's modes */
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.tools-window .footer-menu--inline::before {
  display: none;
}

.tools-window .footer-menu--inline .footer-menu__item {
  padding: 6px 4px;
  border-radius: 6px;
}

/* The AI window: the chat is its body, one frame - no box of its own inside the window's border - and the
   credits card may stand over the window's top (nothing clips it) */
.tool-window--ai {
  overflow: visible;
}

.tool-window--ai .tool-window__title {
  border-radius: 10px 10px 0 0;
}

.ai-chat--window .ai-composer {
  border: 0;
  border-radius: 0 0 10px 10px;
  background: #191919;
}

/* Claude's words formatted (AiMarkdown.jsx) */
.ai-md {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-md strong {
  color: #ffffff;
  font-weight: 650;
}

.ai-md em {
  font-style: italic;
  color: #dcdcdc;
}

.ai-md__h {
  margin: 4px 0 0;
  color: #ffffff;
  font-weight: 650;
  line-height: 1.3;
}

.ai-md__h1 { font-size: 14px; }
.ai-md__h2 { font-size: 13px; }
.ai-md__h3 { font-size: 12px; color: #cfcfcf; text-transform: none; }

.ai-md__list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

ol.ai-md__list li::marker {
  color: #7fb6f5;
  font-weight: 600;
}

ul.ai-md__list li::marker {
  color: #6f6f6f;
}

.ai-md__quote {
  margin: 0;
  padding: 4px 10px;
  border-left: 2px solid rgba(74, 157, 248, 0.6);
  border-radius: 0 6px 6px 0;
  background: rgba(74, 157, 248, 0.06);
  color: #d0d0d0;
}

.ai-md__code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #2f2f2f;
  color: #f0c27a;
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-size: 11px;
}

.ai-md__rule {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
}

.ai-md__link {
  color: #7fb6f5;
}

/* Text Tools in the arrow group: its divider as far from Shift and from T as the bar's own (its 10px gap) */
.footer-actions__divider--in-group {
  margin: 0 10px;
}

/* in the overflow menu the row is closer */
.footer-overflow-popup .footer-actions__divider--in-group {
  margin: 0 6px;
  height: 22px;
}

/* The footer's icons the same size to the eye, not by their boxes: a solid shape (T) reads bigger than an
   outline (Add Null) or a dashed one (Frame), a star smaller - so each its own size; Shift by its width */
.footer-actions .footer-button[data-action="toggle-anchor-popup"] .footer-button__icon,
.footer-actions .footer-button[data-action="toggle-directions"] .footer-button__icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.footer-actions .footer-button[data-action="toggle-shift"] .footer-button__icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.footer-actions .footer-button[data-action="toggle-tools"] .footer-button__icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.footer-actions .footer-button[data-action="add-null"] .footer-button__icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.footer-actions .footer-button[data-action="toggle-ai"] .footer-button__icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.ai-credits__note {
  color: #8a8a8a;
  font-size: 11px;
}

/* New chat in the AI window's title bar, beside "open as a panel": quiet, as the title's other buttons */
.tool-window__title .tool-window__btn--text.ai-reply__new {
  width: auto;
  height: 18px;
  gap: 4px;
  padding: 0 6px 0 5px;
  margin-right: 2px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8a8a8a;
  font-size: 10px;
  font-weight: 600;
}

.tool-window__title .tool-window__btn--text.ai-reply__new:hover:not(:disabled) {
  background: #333;
  color: #f1f5ff;
}

/* The panel's window: the request under way only - one line while it works, then the result with its time in
   the right corner (no line of its own) */
.ai-compact {
  display: block;
  min-width: 0;
  color: #e6e6e6;
  font-size: 12px;
  line-height: 1.45;
}

.ai-compact--live {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 17px;
  line-height: 17px;
  overflow: hidden;
  color: #9a9a9a;
}

/* one line while it thinks: nothing to scroll (12px x 1.45 = 17.4px and the moving mark went a pixel past the
   box now and then: its scrollbar blinked, 2026-11-15) */
.ai-reply__body:has(> .ai-compact--live) {
  overflow-y: hidden;
}

.ai-compact--live .ai-spinner {
  flex: none;
}

/* the newest words in view: a long thought shows its end, its start fading out on the left */
.ai-compact__line {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
  white-space: nowrap;
  font-style: italic;
}

.ai-compact__line > span {
  flex: none;
}

.ai-compact__line.is-cut {
  justify-content: flex-end;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px);
  mask-image: linear-gradient(to right, transparent 0, #000 28px);
}

.ai-compact__meta.ai-result__meta {
  float: right;
  margin: 0 0 0 10px;
  padding: 0;
  line-height: 1.45;
  font-size: 11px;
  color: #6f6f6f;
}

/* the thinking's icon: MotionBoy AI's stars, breathing; the thinking on its right in one line */
.ai-compact__icon {
  flex: none;
  width: 13px;
  height: 13px;
  color: #c8c8c8;
  transform-origin: 50% 50%;
  animation: ai-think-breathe 1.2s ease-in-out infinite;
}

.ai-think {
  display: inline-flex;
}

.ai-think svg,
.ai-think .ai-engine-icon {
  width: 100%;
  height: 100%;
}

.ai-think--mb {
  color: #4a9df8;
}

/* Claude's mark: turns slowly, a little bigger and smaller as it goes */
.ai-think--claude {
  color: #d97757;
  animation: ai-think-breathe 1.2s ease-in-out infinite, ai-think-claude 2.4s ease-in-out infinite;
}

/* ChatGPT's knot: turns round */
.ai-think--codex {
  color: #ececec;
  animation: ai-think-breathe 1.2s ease-in-out infinite, ai-think-turn 1.6s linear infinite;
}

@keyframes ai-think-claude {
  0% { transform: rotate(0deg) scale(0.82); }
  50% { transform: rotate(120deg) scale(1.06); }
  100% { transform: rotate(240deg) scale(0.82); }
}

@keyframes ai-think-turn {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-think,
  .ai-think path {
    animation: none !important;
  }
}

/* MotionBoy AI's stars: the big star pulses and turns a little; the small one twinkles in between */
.ai-think--mb path:first-child {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: ai-think-star 1.2s ease-in-out infinite;
}

.ai-compact__icon-small {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: ai-think-twinkle 1.2s ease-in-out infinite;
}

@keyframes ai-think-breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes ai-think-star {
  0%, 100% { transform: scale(0.72) rotate(0deg); }
  50% { transform: scale(1.05) rotate(45deg); }
}

@keyframes ai-think-twinkle {
  0%, 100% { opacity: 1; transform: scale(1.1); }
  50% { opacity: 0.15; transform: scale(0.4); }
}

/* the window: no more room than the lines need - the answer, a thin line, the box */
.ai-chat--window .ai-composer[data-mode="reply"] > .ai-reply {
  margin-bottom: 5px;
  padding-bottom: 5px;
  gap: 0;
}

/* the answer done: a check on the left, where the thinking's stars were; the result on its right */
.ai-compact--done {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 7px;
}

.ai-compact__icon--done {
  margin-top: 2px;
  color: #6fbf73;
  animation: none;
}

.ai-compact__result {
  flex: 1;
  min-width: 0;
}

.ai-compact--writing .ai-compact__icon {
  margin-top: 2px;
}

/* What the AI runs on: its name in the AI window's title bar (and the AI panel's head), a caret, a menu */
.ai-engine {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
}

.ai-engine__chip {
  height: 18px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: -5px;
  padding: 0 5px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: #9a9a9a;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.ai-engine__chip:hover,
.ai-engine__chip[aria-expanded="true"] {
  background: #2e2e2e;
  color: #e6e6e6;
}

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

.ai-engine__caret {
  width: 9px;
  height: 9px;
  flex: none;
}

/* the AI panel: the name over the earlier chats */
.ai-page__head {
  flex: none;
  display: flex;
  padding: 0 8px;
}

.ai-page__head .ai-engine__chip {
  height: 22px;
  font-size: 11px;
}

/* the menu, over everything (the window would clip it): placed by the name */
.ai-engine__float {
  position: fixed;
  z-index: 1000;
}

.ai-engine-icon {
  width: 13px;
  height: 13px;
  flex: none;
  display: block;
}

.ai-engine-icon--mb {
  color: #4a9df8;
}

.ai-engine-icon--claude {
  color: #d97757;
}

.ai-engine-icon--codex {
  color: #ececec;
}

.ai-engine__menu {
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #2a2a2a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.ai-engine__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
}

.ai-engine__item:hover:not([aria-disabled="true"]),
.ai-engine__item:focus-visible {
  background: #333;
  outline: none;
}

.ai-engine__item[aria-disabled="true"] {
  cursor: default;
}

.ai-engine__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ai-engine__text b {
  font-weight: 600;
  color: #e6e6e6;
}

.ai-engine__text small {
  overflow: hidden;
  color: #9a9a9a;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-engine__item[data-state="error"] .ai-engine__text small {
  color: #e08a7a;
  white-space: normal;
}

.ai-engine__check {
  display: inline-flex;
  color: #4a9df8;
}

.ai-engine__check .ai-icon {
  width: 13px;
  height: 13px;
}

.ai-engine__connect {
  height: 22px;
  padding: 0 9px;
  font-size: 11px;
}

.ai-engine__note {
  margin: 3px 2px 0;
  padding: 6px 6px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #8a8a8a;
  font-size: 10.5px;
  line-height: 1.4;
  white-space: normal;
}

.ai-agent__link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: #6aa8ff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

/* A bought pack that needs its key here (lib/packKeys.js): the preview dimmed, a "Key" button over it that
   opens the key dialog (PackKeyDialog); its buttons open the dialog too (usePresetStore._runPresetApply). */
.preview-card--locked .preview-card__thumb {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.preview-card__lock {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px 0 5px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffd27a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.preview-card__lock:hover {
  background: rgba(6, 108, 227, 0.95);
  color: #fff;
}

.preview-card__lock svg {
  width: 12px;
  height: 12px;
}

/* The key dialog */
.pack-key {
  max-width: 380px;
}

.pack-key__input {
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  margin: 0 0 10px;
  padding: 0 10px;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  background: #161616;
  color: var(--color-text-primary);
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  outline: none;
}

.pack-key__input:focus {
  border-color: #3a95ff;
}

.pack-key__error {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #ff8a92;
}

.pack-key__computers {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.pack-key__computers li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  color: #c8c8c8;
}

.pack-key__free {
  padding: 3px 10px;
  border: 1px solid #3a3a3a;
  border-radius: 5px;
  background: #2b2b2b;
  color: var(--color-text-primary);
  font-size: 11px;
  cursor: pointer;
}

.pack-key__free:hover:not(:disabled) {
  background: #353535;
}
