/* V0.3.29 compact AI content controls and group-consistent layers */

/* Keep the page hierarchy to one separator, one panel border and one soft shadow. */
.topbar {
  border-bottom: 1px solid rgba(31, 42, 61, .09);
  box-shadow: none;
}

.editor-panel,
.preview-panel {
  border-color: rgba(207, 217, 230, .74);
  box-shadow: 0 8px 22px rgba(31, 51, 79, .045);
}

.custom-size-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 54px;
  gap: 7px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(8, 124, 250, .18);
  border-radius: 11px;
  background: rgba(238, 246, 255, .7);
}

.custom-size-panel[hidden] { display: none; }

.custom-size-panel label {
  position: relative;
  min-width: 0;
}

.custom-size-panel label span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 10px;
  color: #7a879a;
  font-size: 10px;
  font-weight: 650;
  transform: translateY(-50%);
  pointer-events: none;
}

.custom-size-panel input {
  height: 38px;
  padding: 0 9px 0 30px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 650;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.custom-size-panel > i {
  color: #8794a8;
  font-style: normal;
  font-size: 12px;
}

.custom-size-panel button {
  height: 38px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.custom-size-panel small {
  grid-column: 1 / -1;
  color: #718096;
  font-size: 9px;
  line-height: 1.45;
}

.layer-list {
  gap: 6px;
}

/* Keep the layer title aligned with its inline property panel on hover. */
.layer-row:hover,
.layer-row:focus-within {
  transform: translateY(-1px);
}

.layer-row.active:has(+ .property-panel:not(.empty-property)) {
  border-radius: 11px 11px 0 0;
  box-shadow: none;
}

.layer-row.active + .property-panel:not(.empty-property) {
  margin: -7px 0 7px;
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  padding-top: 14px;
  border-top: 0;
  border-radius: 0 0 13px 13px;
  box-shadow: 0 8px 18px rgba(8, 124, 250, .1);
}

.layer-list > .property-panel.empty-property {
  margin-top: 2px;
}

/* V0.3.25 shape styles, gradients and on-canvas gradient handles */
.canvas-shape-line,
.canvas-shape-line svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.gradient-editor {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.gradient-axis {
  position: absolute;
  height: 1px;
  display: block;
  border-radius: 999px;
  background: rgba(8, 124, 250, .9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .88);
  transform-origin: left center;
}

.gradient-editor-radial .gradient-axis {
  background: repeating-linear-gradient(90deg, rgba(8, 124, 250, .95) 0 5px, transparent 5px 8px);
  box-shadow: none;
}

.gradient-handle {
  position: absolute;
  width: 13px;
  height: 13px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 2px 7px rgba(8, 124, 250, .38), 0 0 0 1px rgba(8, 124, 250, .32);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  transform: translate(-50%, -50%);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.gradient-handle-end {
  background: #fff;
  box-shadow: 0 2px 7px rgba(8, 124, 250, .32), inset 0 0 0 3px var(--blue), 0 0 0 1px #fff;
}

.gradient-handle:hover,
.gradient-handle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(8, 124, 250, .14), 0 3px 8px rgba(8, 124, 250, .4);
  transform: translate(-50%, -50%) scale(1.12);
}

.shape-style-field,
.shape-paint-field,
.gradient-stop-editor,
.shape-effect-heading {
  grid-column: 1 / -1;
}

.shape-style-switch,
.paint-mode-switch {
  margin-top: 6px;
  padding: 3px;
  display: grid;
  gap: 3px;
  border-radius: 10px;
  background: #edf1f6;
}

.shape-style-switch {
  grid-template-columns: 1fr 1fr;
}

.shape-style-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shape-style-row > span {
  flex: 0 0 auto;
}

.shape-style-row .shape-style-switch {
  width: min(190px, 68%);
  margin-top: 0;
}

.paint-mode-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shape-style-switch button,
.paint-mode-switch button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  color: #5d687a;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.shape-style-switch button .hugeicon-svg {
  width: 14px;
  height: 14px;
}

/* V0.3.26 — compact destructive action in the selected layer header. */
.layer-delete-action {
  width: 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #fff;
  background: var(--danger);
  opacity: 0;
  pointer-events: none;
  transform: scale(.86);
  transition: width 160ms ease, opacity 140ms ease, transform 160ms ease, background-color 140ms ease;
}

.layer-row.active .layer-delete-action {
  width: 24px;
  min-width: 24px;
  color: #fff;
  background: var(--danger);
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.layer-row.active .layer-delete-action:hover {
  color: #fff;
  background: #bd3e3e;
}

.shape-style-switch button:hover,
.paint-mode-switch button:hover {
  color: var(--blue-strong);
  transform: translateY(-1px);
}

.shape-style-switch button.active,
.paint-mode-switch button.active {
  color: var(--blue-strong);
  background: #fff;
  box-shadow: 0 2px 7px rgba(31, 49, 77, .08);
}

.line-style-icon {
  width: 16px;
  height: 2px;
  display: inline-block;
  border-radius: 99px;
  background: currentColor;
}

.shape-solid-color {
  display: block;
}

.shape-color-control {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 6px;
}

.shape-color-control input[type="color"] {
  width: 34px;
  height: 32px;
  padding: 4px;
  border-radius: 8px;
}

.shape-color-control input[type="text"] {
  height: 32px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.gradient-stop-editor {
  padding: 9px;
  border: 1px solid rgba(8, 124, 250, .14);
  border-radius: 11px;
  background: rgba(245, 249, 255, .8);
}

.gradient-stop-heading,
.shape-effect-heading,
.gradient-stop-row,
.gradient-stop-row label,
.shape-shadow-toggle {
  display: flex;
  align-items: center;
}

.gradient-stop-heading,
.shape-effect-heading {
  justify-content: space-between;
}

.gradient-stop-heading > span,
.shape-effect-heading > span {
  color: #4f5d71;
  font-size: 10px;
  font-weight: 700;
}

.gradient-stop-heading button {
  min-height: 25px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(8, 124, 250, .18);
  border-radius: 7px;
  color: var(--blue-strong);
  background: #fff;
  font-size: 9px;
  cursor: pointer;
}

.gradient-stop-heading button:disabled,
.gradient-stop-delete:disabled {
  opacity: .35;
  cursor: default;
}

.gradient-stop-list {
  margin-top: 7px;
  display: grid;
  gap: 5px;
}

.gradient-stop-row {
  min-width: 0;
  padding: 6px;
  display: grid;
  grid-template-columns: 20px 28px minmax(62px, 1fr) minmax(62px, 1fr) 24px;
  gap: 5px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(31, 49, 77, .055);
}

.gradient-stop-index {
  color: #8290a4;
  font-family: "DIN Alternate", ui-monospace, sans-serif;
  font-size: 9px;
  font-weight: 700;
}

.gradient-stop-row > input[type="color"] {
  width: 28px;
  height: 28px;
  padding: 3px;
  border-radius: 7px;
}

.gradient-stop-row label {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 4px;
}

.gradient-stop-row label span,
.gradient-stop-row output {
  color: #778398;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.gradient-stop-row label input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 12px;
}

.gradient-stop-delete {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #d34c4c;
  background: transparent;
  cursor: pointer;
}

.gradient-stop-delete:hover:not(:disabled) {
  background: rgba(211, 76, 76, .08);
}

.gradient-canvas-hint {
  margin: 7px 0 0;
  color: #7c889a;
  font-size: 8px;
  line-height: 1.45;
}

.shape-effect-heading {
  min-height: 30px;
  padding-top: 3px;
  border-top: 1px solid rgba(31, 49, 77, .08);
}

.shape-shadow-toggle {
  gap: 6px;
  color: #536075;
  font-size: 9px;
  cursor: pointer;
}

.shape-shadow-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shape-shadow-toggle i {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #dbe2ec;
  transition: background-color 150ms ease;
}

.shape-shadow-toggle i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 49, 77, .18);
  transition: transform 150ms ease;
}

.shape-shadow-toggle input:checked + i {
  background: var(--blue);
}

.shape-shadow-toggle input:checked + i::after {
  transform: translateX(12px);
}

.shape-shadow-toggle b {
  font-size: 9px;
  font-weight: 650;
}

/* A linked element keeps one source of truth across every image in the set. */
.group-consistency-control {
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(112, 128, 151, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .68);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.property-grid > .full {
  grid-column: 1 / -1;
}

.group-consistency-control.active {
  border-color: rgba(8, 124, 250, .28);
  background: rgba(235, 245, 255, .86);
  box-shadow: inset 3px 0 0 var(--blue);
}

.group-consistency-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #64738a;
  background: #edf1f6;
}

.group-consistency-control.active .group-consistency-icon {
  color: #fff;
  background: var(--blue);
}

.group-consistency-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.group-consistency-copy b {
  color: #253146;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .02em;
}

.group-consistency-copy small {
  overflow: hidden;
  color: #788599;
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-switch {
  cursor: pointer;
}

.compact-switch span {
  width: 30px;
  height: 18px;
}

.compact-switch span::after {
  width: 14px;
  height: 14px;
}

.compact-switch input:checked + span::after {
  transform: translateX(12px);
}

.layer-group-badge {
  width: 14px;
  height: 14px;
  margin-left: 4px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  color: var(--blue-strong);
  background: rgba(8, 124, 250, .1);
  vertical-align: -3px;
}

.layer-group-badge .hugeicon-svg {
  width: 9px;
  height: 9px;
}

.layer-row.active .layer-group-badge {
  color: var(--blue);
  background: #fff;
}

/* AI content fields: three compact sections instead of one uninterrupted form. */
.ai-content-editor {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.ai-control-section {
  min-width: 0;
  padding: 10px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(126, 143, 166, .16);
  border-radius: 11px;
  background: rgba(255, 255, 255, .72);
}

.ai-control-section > header {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.ai-section-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--blue-strong);
  background: rgba(8, 124, 250, .09);
  font-family: "DIN Alternate", "Arial Narrow", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
}

.ai-control-section > header div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.ai-control-section > header b {
  color: #273449;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .02em;
}

.ai-control-section > header small {
  color: #8490a2;
  font-size: 8px;
  line-height: 1.45;
  letter-spacing: .015em;
}

.ai-control-section .field {
  min-width: 0;
  margin: 0;
}

.ai-control-section .field > span {
  margin-bottom: 4px;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: .02em;
}

.ai-control-section input,
.ai-control-section select {
  height: 32px;
  min-width: 0;
  font-size: 10px;
}

.ai-control-section textarea {
  min-height: 54px;
  padding: 8px 9px;
  font-size: 10px;
  line-height: 1.65;
  letter-spacing: .025em;
}

.ai-control-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-control-grid .wide {
  grid-column: 1 / -1;
}

.ai-template-meta {
  min-width: 0;
  padding: 7px 8px;
  display: grid;
  gap: 2px;
  border-radius: 8px;
  background: #f4f7fb;
}

.ai-template-meta b {
  font-size: 9px;
}

.ai-template-meta span,
.ai-template-empty span {
  overflow: hidden;
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-template-empty {
  min-height: 48px;
  padding: 8px;
  border-radius: 9px;
}

.ai-type-help {
  margin: 0;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 8px;
  line-height: 1.45;
}

.ai-reference-grid {
  min-width: 0;
  gap: 6px;
}

.ai-reference-card {
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 5px;
  padding: 7px;
  border-radius: 9px;
}

.ai-reference-card > span,
.ai-reference-card > span .hugeicon-svg {
  width: 18px;
  height: 18px;
}

.ai-reference-card b {
  min-width: 0;
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-layer-rule {
  min-width: 0;
  align-items: center;
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: .015em;
}

.ai-layer-rule > .hugeicon-svg {
  width: 14px;
  height: 14px;
}

.ai-layer-generate {
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 0 10px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 6px;
  border-radius: 10px;
  font-size: 10px;
}

.ai-layer-generate > span:nth-child(2),
.ai-layer-generate small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .ai-control-grid {
    grid-template-columns: 1fr;
  }

  .ai-control-grid .wide {
    grid-column: auto;
  }
}

/* V0.3.30 — visible AI progress and manageable reference-image previews. */
.canvas-element-ai-content.is-generating {
  overflow: hidden;
  border-radius: 14px;
}

.canvas-ai-progress {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 24px;
  color: #273449;
  background: rgba(246, 250, 255, .94);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.canvas-ai-progress-orbit {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(8, 124, 250, .18);
  border-radius: 14px;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 12px 28px rgba(28, 77, 137, .1);
  animation: aiProgressFloat 1.8s ease-in-out infinite;
}

.canvas-ai-progress b {
  font-family: "DIN Alternate", "Arial Narrow", ui-monospace, monospace;
  font-size: 30px;
  line-height: 1;
}

.canvas-ai-progress > span {
  color: #4c5c73;
  font-size: 15px;
  font-weight: 650;
}

.canvas-ai-progress > small {
  color: #8a96a8;
  font-size: 11px;
}

.canvas-ai-progress-track {
  width: min(320px, 72%);
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8, 124, 250, .1);
}

.canvas-ai-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087cfa, #42a5ff);
  box-shadow: 0 0 12px rgba(8, 124, 250, .34);
  transition: width .55s cubic-bezier(.2, .8, .2, 1);
}

@keyframes aiProgressFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

.ai-reference-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.ai-reference-thumbnails {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.ai-reference-thumb {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(123, 143, 170, .2);
  border-radius: 8px;
  background: #eef3f9;
}

.ai-reference-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: #fff;
}

.ai-reference-thumb button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: rgba(25, 34, 49, .78);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
  cursor: pointer;
}

.ai-reference-thumb button:hover {
  background: #e24949;
  transform: translateY(-1px);
}

.ai-reference-thumb figcaption {
  padding: 4px 5px;
  overflow: hidden;
  color: #667287;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-reference-empty {
  min-height: 29px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(123, 143, 170, .2);
  border-radius: 7px;
  color: #a0aaba;
  font-size: 7px;
}

/* V0.3.31 — distinguish content truth from visual style before generation. */
.ai-style-help {
  color: #4d5e78;
  background: linear-gradient(90deg, rgba(8, 124, 250, .08), rgba(79, 96, 238, .05));
  border-left-color: #6575f5;
}

.ai-reference-card b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-reference-card b em {
  padding: 2px 4px;
  border-radius: 999px;
  color: #738097;
  background: rgba(112, 129, 154, .1);
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
}

.ai-reference-card.is-required {
  border-color: rgba(239, 145, 35, .6);
  background: rgba(255, 248, 237, .76);
}

.ai-reference-card.is-required b em {
  color: #b76008;
  background: rgba(245, 150, 38, .14);
}

.ai-reference-card.has-reference {
  border-color: rgba(28, 166, 111, .38);
  background: rgba(239, 252, 247, .74);
}

.ai-generation-readiness {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 7px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 8px;
  line-height: 1.45;
}

.ai-generation-readiness .hugeicon-svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.ai-generation-readiness.is-blocked {
  color: #9a560d;
  border-color: rgba(234, 146, 43, .24);
  background: rgba(255, 247, 233, .9);
}

.ai-generation-readiness.is-ready {
  color: #16754f;
  border-color: rgba(28, 166, 111, .2);
  background: rgba(235, 251, 244, .88);
}

.ai-layer-generate:disabled {
  cursor: not-allowed;
  filter: saturate(.55);
  opacity: .52;
  transform: none;
}

/* V0.3.32 — compact linking controls and reusable Logo assets. */
.group-consistency-control {
  min-height: 40px;
  padding: 6px 8px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 6px;
}

.group-consistency-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
}

.group-consistency-icon .hugeicon-svg {
  width: 9px;
  height: 9px;
}

.ratio-lock-toggle {
  top: 6px;
  right: 6px;
  width: 17px;
  height: 17px;
  border-radius: 5px;
}

.ratio-lock-toggle .hugeicon-svg {
  width: 8px;
  height: 8px;
}

.layer-row.active .layer-delete-action {
  margin-left: 2px;
}

.logo-source-tools > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.logo-source-tools button,
.logo-source-tools label {
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(8, 124, 250, .18);
  border-radius: 8px;
  color: var(--blue-strong);
  background: rgba(255, 255, 255, .86);
  cursor: pointer;
}

.logo-source-tools button:hover,
.logo-source-tools label:hover {
  border-color: rgba(8, 124, 250, .42);
  background: #fff;
}

.logo-source-tools b {
  overflow: hidden;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-source-tools input {
  display: none;
}

.logo-source-tools em {
  padding: 3px 5px;
  border-radius: 5px;
  color: #768399;
  background: #eaf0f7;
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
}

.logo-position-field,
.logo-format-note {
  min-height: 32px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

/* V0.3.33 — compact status chips, bottom actions and richer media/background sources. */
.toast-stack {
  top: 76px;
  width: auto;
  max-width: min(560px, calc(100vw - 40px));
  align-items: center;
  gap: 6px;
}

.toast {
  width: fit-content;
  min-width: 0;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 34px 7px 10px;
  gap: 7px;
  border-color: color-mix(in srgb, var(--toast-color, var(--blue)) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--toast-color, var(--blue)) 10%, white);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--toast-color, var(--blue)) 12%, transparent);
}

.toast::after { display: none; }
.toast-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  border-radius: 50%;
  background: transparent;
}
.toast-icon .hugeicon-svg { width: 14px; height: 14px; }
.toast-copy { display: flex; flex-direction: row; align-items: baseline; gap: 5px; }
.toast-copy strong { color: var(--toast-color, var(--blue)); font-size: 10px; white-space: nowrap; }
.toast-copy > span { color: color-mix(in srgb, var(--toast-color, var(--blue)) 72%, #263247); font-size: 9px; line-height: 1.35; }
.toast-close { right: 7px; width: 20px; height: 20px; border-radius: 50%; background: transparent; }
.toast.loading .toast-icon { width: 14px; height: 14px; flex-basis: 14px; }

.layer-name-line {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.layer-name-line > span { overflow: hidden; text-overflow: ellipsis; }
.layer-group-badge { flex: 0 0 14px; margin-left: 0; vertical-align: middle; }

.layer-list > .property-panel.empty-property { display: none !important; }

.background-layer-row:not(.active) {
  background: #e2e8f1;
  box-shadow: inset 3px 0 0 #8997aa;
}
.background-layer-row:not(.active):hover { background: #dbe3ed; }

.property-bottom-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
  gap: 8px;
}
.property-group-action,
.property-delete-action {
  min-width: 0;
  min-height: 48px;
  padding: 7px 9px;
  display: grid;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  cursor: pointer;
}
.property-group-action {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  border: 1px solid rgba(8, 124, 250, .18);
  background: rgba(235, 245, 255, .68);
}
.property-group-action.active { border-color: rgba(8, 124, 250, .42); background: rgba(224, 240, 255, .94); }
.property-delete-action {
  grid-template-columns: 22px minmax(0, 1fr);
  border: 1px solid rgba(214, 67, 67, .2);
  color: #c74242;
  background: rgba(255, 242, 242, .82);
  text-align: left;
}
.property-delete-action:hover { border-color: rgba(214, 67, 67, .42); background: #fff0f0; }
.property-group-action > span:nth-child(2), .property-delete-action > span { min-width: 0; display: grid; gap: 1px; }
.property-bottom-actions b { font-size: 9px; font-weight: 750; }
.property-bottom-actions small { overflow: hidden; color: #7b8799; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.property-delete-action small { color: #a57676; }
.property-action-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: var(--blue); background: #fff; }
.property-delete-action > .hugeicon-svg { width: 15px; height: 15px; justify-self: center; }

.property-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.property-subheading > span { display: grid; gap: 2px; }
.property-subheading b { font-size: 11px; }
.property-subheading small { color: #8490a2; font-size: 8px; }
.property-subheading button { height: 27px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid rgba(8,124,250,.18); border-radius: 8px; color: var(--blue); background: #fff; font-size: 8px; cursor: pointer; }

.image-source-tools > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.image-source-tools button {
  height: 34px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(8,124,250,.16);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
}
.image-source-tools button b { font-size: 8px; white-space: nowrap; }

.background-decoration-manager { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(31,42,61,.08); }
.background-decoration-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.background-decoration-heading > span { display: grid; gap: 2px; }
.background-decoration-heading b { font-size: 10px; }
.background-decoration-heading small { color: #8490a2; font-size: 7px; }
.background-decoration-heading button { height: 29px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid rgba(8,124,250,.18); border-radius: 8px; color: var(--blue); background: #fff; font-size: 8px; cursor: pointer; }
.background-decoration-list { margin-top: 7px; display: grid; gap: 5px; }
.background-decoration-list > p { margin: 0; padding: 10px; border-radius: 8px; color: #8490a2; background: #f3f6fa; font-size: 8px; line-height: 1.5; }
.background-decoration-list button { height: 34px; padding: 0 8px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto 20px; align-items: center; gap: 6px; border: 1px solid rgba(112,128,151,.13); border-radius: 8px; color: #263247; background: rgba(255,255,255,.82); cursor: pointer; text-align: left; }
.background-decoration-list button i { width: 20px; height: 20px; border-radius: 6px; }
.background-decoration-list button span { overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.background-decoration-list button em { color: #8490a2; font-size: 7px; font-style: normal; }
.background-decoration-list button b { color: var(--blue); font-family: "DIN Alternate", sans-serif; font-size: 9px; }

.modal-image-source { width: min(760px, calc(100vw - 40px)); }
.image-source-picker { display: grid; gap: 14px; }
.image-source-tabs { padding: 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 12px; background: #eef2f7; }
.image-source-tabs button { height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 9px; color: #667287; background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.image-source-tabs button span { white-space: nowrap; }
.image-source-tabs .hugeicon-svg { width: 15px; height: 15px; flex: 0 0 15px; }
.image-source-tabs button.active { color: var(--blue); background: #fff; box-shadow: 0 2px 8px rgba(31,49,77,.08); }
.image-source-panel[hidden], .human-generator[hidden] { display: none; }
.image-source-panel { display: grid; gap: 10px; }
.image-source-panel > label, .human-generator > label { display: grid; gap: 6px; color: #526076; font-size: 9px; font-weight: 700; }
.image-source-panel textarea, .image-source-panel input[type="text"] { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; resize: vertical; }
.source-dropzone { min-height: 180px; display: grid !important; place-items: center; border: 1px dashed rgba(8,124,250,.35); border-radius: 14px; background: rgba(238,246,255,.56); cursor: pointer; }
.source-dropzone input, .human-actions input { display: none; }
.source-dropzone > span { display: grid; place-items: center; gap: 5px; color: var(--blue); }
.source-dropzone b { font-size: 11px; }.source-dropzone small { color: #8490a2; font-size: 8px; }
.source-reference input, .human-generator input { padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.source-primary-action { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); cursor: pointer; font-weight: 750; }
.human-library { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.human-library > p { grid-column: 1/-1; margin: 0; padding: 24px; border-radius: 10px; color: #8490a2; background: #f3f6fa; text-align: center; font-size: 9px; }
.human-library button { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.human-library img { width: 100%; aspect-ratio: 1; object-fit: contain; background: linear-gradient(45deg,#f2f5f9 25%,transparent 25%) 0 0/12px 12px; }
.human-library span { padding: 7px; display: block; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.human-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.human-actions label, .human-actions button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(8,124,250,.18); border-radius: 9px; color: var(--blue); background: #fff; cursor: pointer; font-size: 9px; font-weight: 700; }
.human-actions .hugeicon-svg,
.human-generator .hugeicon-svg,
.source-primary-action .hugeicon-svg { width: 15px; height: 15px; flex: 0 0 15px; }
.human-actions label span,
.human-actions button span,
.source-primary-action span { white-space: nowrap; }
.human-generator { padding: 10px; display: grid; gap: 9px; border: 1px solid rgba(8,124,250,.14); border-radius: 11px; background: rgba(238,246,255,.55); }
.alpha-note { padding: 8px; display: flex; align-items: center; gap: 6px; border-radius: 8px; color: #52715f; background: #eef9f2; font-size: 8px; }

#resourceContent { min-width: 0; }
.resource-content-head {
  min-height: 44px;
  margin-bottom: 12px;
  padding: 0 2px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(112, 128, 151, .13);
}
.resource-content-head > div { min-width: 0; display: grid; gap: 2px; }
.resource-content-head b { font-size: 13px; }
.resource-content-head small { color: #8490a2; font-size: 9px; }
.resource-content-head button {
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(8, 124, 250, .16);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}
.resource-content-head button:disabled { opacity: .55; cursor: wait; }
.resource-content-head button .hugeicon-svg { width: 13px; height: 13px; flex: 0 0 13px; }
.resource-content-head button span { white-space: nowrap; }
.folder-resource-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.folder-resource-card { min-width: 0; }
.folder-resource-card .resource-thumb { height: 126px; background-color: #f5f7fa; }
.folder-resource-card .resource-thumb img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
.folder-resource-card > b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record-resource-grid { margin-top: 12px; }
.empty-resource span { max-width: 430px; text-align: center; line-height: 1.7; }

.logo-position-field > span,
.logo-format-note > span {
  margin: 0 !important;
  white-space: nowrap;
}

.logo-format-note strong {
  color: #758196;
  font-size: 8px;
  font-weight: 650;
}

.logo-position-field .position-grid {
  grid-template-columns: repeat(3, 12px);
  gap: 2px;
}

.logo-position-field .position-grid button {
  width: 12px;
  height: 9px;
  padding: 0;
  border-radius: 3px;
}

.logo-resource-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.logo-resource-card,
.logo-upload-card {
  min-height: 148px;
}

.logo-resource-card .resource-thumb {
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.logo-resource-card .resource-thumb:hover {
  box-shadow: inset 0 0 0 2px rgba(8, 124, 250, .28);
}

.logo-resource-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
}

.logo-resource-meta span {
  min-width: 0;
}

.logo-resource-meta button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #d64a4a;
  background: rgba(214, 74, 74, .08);
  cursor: pointer;
}

.logo-upload-card {
  cursor: pointer;
}

.logo-upload-card input {
  display: none;
}

/* V0.3.35 · AI 场景、图层收起与管理界面 */
.layer-actions { gap: 3px; }
.layer-collapse-action { margin-left: 1px; color: #617087; background: rgba(255, 255, 255, .52); }
.layer-collapse-action .hugeicon-svg { width: 12px; height: 12px; }
.layer-row.active .layer-collapse-action { color: #fff; background: rgba(255, 255, 255, .14); }
.property-collapsed { display: none !important; }

.gradient-stop-heading > div,
.gradient-stop-heading button,
.background-gradient-reverse { display: inline-flex; align-items: center; gap: 4px; }
.gradient-stop-heading button,
.background-gradient-reverse {
  min-height: 27px; padding: 0 8px; border: 1px solid #dbe5f1; border-radius: 8px;
  color: #58677d; background: #fff; font-size: 9px; font-weight: 650;
}
.gradient-stop-heading button:hover,
.background-gradient-reverse:hover { color: var(--blue); border-color: #9dccff; background: #f4f9ff; }
.gradient-stop-color { min-width: 112px; display: grid; grid-template-columns: 34px minmax(64px, 1fr); gap: 5px; align-items: center; }
.gradient-stop-color input[type="color"] { width: 34px; height: 29px; padding: 3px; }
.gradient-stop-color input[type="text"] { width: 100%; min-width: 0; height: 29px; padding: 0 7px; font: 650 9px/1 ui-monospace, monospace; text-transform: uppercase; }

.image-alpha-control {
  padding: 9px 10px !important; display: flex !important; align-items: center; justify-content: space-between;
  gap: 12px; border: 1px solid #dce7f4; border-radius: 11px; background: #f7faff;
}
.image-alpha-control > span:first-child { display: grid; gap: 2px; }
.image-alpha-control b { color: #243149; font-size: 10px; }
.image-alpha-control small { color: #8390a5; font-size: 8px; }

.background-ai-controls { padding: 10px; display: grid; gap: 9px; border: 1px solid #d8e7f8; border-radius: 12px; background: #f7fbff; }
.background-ai-controls[hidden] { display: none; }
.background-ai-controls label { display: grid; gap: 5px; color: #53637a; font-size: 9px; font-weight: 650; }
.background-ai-controls textarea { min-height: 68px; padding: 9px; border: 1px solid #d9e2ef; border-radius: 9px; resize: vertical; font: inherit; line-height: 1.55; background: #fff; }
.source-reference input[type="file"] { padding: 7px; border: 1px dashed #bfd2ea; border-radius: 9px; color: #68778c; background: #fff; }
.source-reference-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.source-reference-thumbs:empty { display: none; }
.source-reference-thumbs figure { position: relative; width: 48px; height: 48px; margin: 0; overflow: hidden; border: 1px solid #d8e2ee; border-radius: 9px; background: #fff; }
.source-reference-thumbs img { width: 100%; height: 100%; display: block; object-fit: cover; }
.source-reference-thumbs button { position: absolute; top: 3px; right: 3px; width: 17px; height: 17px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(31, 43, 61, .78); }

.resource-head-actions,
.resource-upload-action,
.resource-admin-actions { display: flex; align-items: center; gap: 6px; }
.resource-head-actions > button,
.resource-upload-action,
.resource-admin-actions button {
  min-height: 28px; padding: 0 9px; display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #dbe4ef; border-radius: 8px; color: #58677d; background: #fff;
  font-size: 9px; font-weight: 650; cursor: pointer;
}
.resource-upload-action input { display: none; }
[data-resource-batch-delete],
.resource-admin-actions [data-resource-delete] { color: #d34c4c !important; border-color: #f1caca !important; background: #fff8f8 !important; }
.folder-resource-card { position: relative; }
.resource-select { position: absolute; z-index: 2; top: 8px; left: 8px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 6px; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(30,48,75,.12); }
.resource-select input { width: 13px; height: 13px; accent-color: var(--blue); }
.resource-admin-actions { margin-top: 5px; }
.resource-admin-actions button { flex: 1; justify-content: center; min-width: 0; padding-inline: 5px; }

.admin-invite-panel { margin-top: 18px; padding: 15px; display: grid; gap: 12px; border: 1px solid #d7e6f8; border-radius: 16px; background: #f7fbff; }
.admin-invite-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-invite-panel > header div { display: grid; gap: 2px; }
.admin-invite-panel > header b { color: #1d2b42; font-size: 14px; }
.admin-invite-panel > header small { color: #77869c; font-size: 10px; }
.admin-invite-panel > header button { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 700; }
.admin-invite-form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.admin-invite-form label { display: grid; gap: 5px; color: #65748a; font-size: 10px; font-weight: 650; }
.admin-invite-form input { height: 38px; padding: 0 10px; border: 1px solid #d8e2ef; border-radius: 10px; background: #fff; }
.admin-invite-list { max-height: 180px; display: grid; gap: 6px; overflow: auto; }
.admin-invite-list > p { margin: 0; padding: 9px; color: #8490a2; font-size: 10px; text-align: center; }
.admin-invite-list article { padding: 8px 9px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; border: 1px solid #e0e8f2; border-radius: 10px; background: #fff; }
.admin-invite-list article > div { min-width: 0; display: grid; gap: 2px; }
.admin-invite-list article b { overflow: hidden; color: #26344a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-invite-list article small { color: #8a96a8; font-size: 8px; }
.admin-invite-list code { padding: 5px 7px; border-radius: 7px; color: #087cfa; background: #edf6ff; font: 700 9px/1 ui-monospace, monospace; }
.admin-invite-list article button { height: 27px; padding: 0 8px; border: 1px solid #cfe2fa; border-radius: 7px; color: #087cfa; background: #fff; font-size: 9px; }
.account-footer-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.account-footer-actions > button { margin: 0 !important; }
.auth-card { max-height: calc(100vh - 40px); overflow: auto; }

/* V0.3.38 · 正式入口切换至图层内联版 */
.password-panel {
  margin-top: 18px; padding: 15px; display: grid; gap: 10px;
  border: 1px solid #e0e7f0; border-radius: 16px; background: #fbfcfe;
}
.password-panel header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.password-panel header b { color: #1d2b42; font-size: 13px; }
.password-panel header small { color: #8190a5; font-size: 9px; }
.password-panel > div { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.password-panel input { min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #d8e2ef; border-radius: 10px; background: #fff; }
.password-panel button { height: 38px; padding: 0 13px; border: 0; border-radius: 10px; color: #fff; background: #26344a; font-size: 10px; font-weight: 700; }
.password-panel > p { min-height: 14px; margin: 0; font-size: 9px; }
.password-panel > p.success { color: #168a5b; }
.password-panel > p.error { color: #c23e4c; }
.admin-invite-list article.is-used { opacity: .58; }
.admin-invite-list article button:disabled { cursor: default; opacity: .65; }
.admin-user-list { padding-top: 10px; display: grid; gap: 6px; border-top: 1px solid #dfe7f1; }
.admin-user-list > header { display: flex; align-items: center; justify-content: space-between; color: #435168; font-size: 10px; }
.admin-user-list > header small { color: #8a96a8; }
.admin-user-list > p { margin: 0; padding: 9px; color: #8490a2; font-size: 10px; text-align: center; }
.admin-user-list article { padding: 8px 9px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; border: 1px solid #e0e8f2; border-radius: 10px; background: #fff; }
.admin-user-list article > div { min-width: 0; display: grid; gap: 2px; }
.admin-user-list article b { color: #26344a; font-size: 10px; }
.admin-user-list article small { color: #8a96a8; font-size: 8px; }
.admin-user-list article em { padding: 4px 7px; border-radius: 999px; font-size: 8px; font-style: normal; }
.admin-user-list article em.active { color: #168a5b; background: #eaf8f1; }
.admin-user-list article em.disabled { color: #bd4d55; background: #fff0f1; }
.admin-user-list article button { height: 27px; padding: 0 8px; border: 1px solid #d7e1ec; border-radius: 7px; color: #53637a; background: #fff; font-size: 9px; }

@media (max-width: 760px) {
  .admin-invite-form { grid-template-columns: 1fr; }
  .admin-invite-list article { grid-template-columns: 1fr auto; }
  .admin-invite-list article > div { grid-column: 1 / -1; }
  .password-panel > div { grid-template-columns: 1fr; }
}

/* V0.3.39 · 紧凑控件与资源库响应式修复 */
.logo-source-tools > div {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.logo-source-tools button,
.logo-source-tools label {
  height: 34px;
  padding-inline: 9px;
  gap: 6px;
  overflow: hidden;
}

.logo-source-tools .hugeicon-svg {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
  stroke-width: 1.8;
}

.logo-source-tools b {
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.text-color-field .shape-color-control,
.shape-solid-color .shape-color-control {
  margin-top: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.text-color-field .shape-color-control input[type="color"],
.shape-solid-color .shape-color-control input[type="color"] {
  width: 36px;
  height: 32px;
}

.shape-style-row,
.shape-paint-field,
.shape-solid-color {
  min-height: 36px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.shape-style-row .shape-style-switch {
  width: 100%;
  max-width: none;
}

.shape-style-switch,
.paint-mode-switch {
  width: 100%;
  margin-top: 0;
  padding: 3px;
}

.shape-style-switch button,
.paint-mode-switch button {
  min-height: 30px;
  padding-inline: 7px;
  gap: 5px;
  white-space: nowrap;
}

.shape-style-switch button .hugeicon-svg,
.paint-mode-switch button .hugeicon-svg {
  width: 13px !important;
  height: 13px !important;
  flex: 0 0 13px !important;
}

.gradient-stop-editor {
  padding: 9px 10px 10px;
}

.gradient-stop-heading {
  min-height: 30px;
  gap: 8px;
}

.gradient-stop-heading > div {
  flex: 0 0 auto;
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.gradient-stop-heading button,
.background-gradient-reverse,
.background-decoration-heading button {
  min-height: 28px;
  padding: 0 9px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  line-height: 1;
}

.gradient-stop-heading button .hugeicon-svg,
.background-gradient-reverse .hugeicon-svg,
.background-decoration-heading button .hugeicon-svg {
  width: 13px !important;
  height: 13px !important;
  flex: 0 0 13px !important;
}

.gradient-stop-row {
  grid-template-columns: 20px minmax(82px, 1.05fr) minmax(74px, 1fr) minmax(74px, 1fr) 24px;
  align-items: center;
}

.gradient-stop-color {
  min-width: 0;
  grid-template-columns: 32px minmax(48px, 1fr);
}

.background-controls {
  align-items: end;
}

.background-gradient-reverse {
  width: max-content;
  max-width: 100%;
  justify-self: start;
}

.background-decoration-heading button span,
.background-gradient-reverse span,
.gradient-stop-heading button span {
  white-space: nowrap;
}

.resource-content-head > .resource-head-actions {
  min-width: max-content;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.resource-head-actions > button,
.resource-head-actions > .resource-upload-action {
  width: auto;
  min-width: 0;
  min-height: 32px;
  padding: 0 10px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.resource-head-actions .hugeicon-svg,
.resource-admin-actions .hugeicon-svg {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
}

.resource-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.resource-admin-actions button {
  height: 32px;
  padding: 0 9px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  white-space: nowrap;
}

.resource-admin-actions button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-resource-card {
  display: flex;
  flex-direction: column;
}

.folder-resource-card .resource-admin-actions {
  margin-top: auto;
  padding-top: 7px;
}

@media (max-width: 940px) {
  .resource-content-head {
    align-items: flex-start;
  }

  .resource-content-head > .resource-head-actions {
    flex-wrap: wrap;
  }
}
