:root {
  --bg: #0e0e0e;
  --panel: #fd2501;
  --line: rgba(14, 14, 14, 0.45);
  --soft-line: rgba(188, 188, 188, 0.2);
  --text-dark: #0e0e0e;
  --text-light: #e5e5e5;
  --text-muted: #a6a6a6;
  /* UI contract: docs/ui-style-guide.md. These tokens style controls, not generated assets. */
  --ui-font: "Yango Group Text", "Arial", sans-serif;
  --ui-label: 10px;
  --ui-action: 12px;
  --ui-body: 12px;
  --ui-value: 16px;
  --ui-radius: 8px;
  --ui-radius-small: 4px;
  --ui-control: 32px;
  --ui-chip: 22px;
  --ui-chip-font: 8px;
  --ui-chip-gap: 4px;
  --ui-placeholder: rgb(14 14 14 / 45%);
  --canvas-gutter: 24px;
  --canvas-header: 56px;
  --ui-primary: 48px;
  --ui-space: 8px;
  --ui-field-gap: 6px;
  --ui-group-gap: 16px;
  --ui-padding: 12px;
  --ui-border: 1px;
  --ui-shadow: 0 4px 12px rgb(0 0 0 / 18%);
  --ui-duration: 140ms;
  --ui-disabled: 0.45;
  --ui-fg: var(--text-light);
  --ui-inverse: var(--bg);
}

@font-face {
  font-family: "Yango Group Headline";
  src: url("./assets/fonts/YangoGroupHeadline-Heavy.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yango Group Headline";
  src: url("./assets/fonts/YangoGroupHeadline-HeavyItalic.ttf") format("truetype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

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

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

@font-face {
  font-family: "Noto Sans Armenian UI";
  src: url("./assets/fonts/NotoSansArmenian-CondensedRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Armenian UI";
  src: url("./assets/fonts/NotoSansArmenian-CondensedBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Georgian UI";
  src: url("./assets/fonts/NotoSansGeorgian-CondensedRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Georgian UI";
  src: url("./assets/fonts/NotoSansGeorgian-CondensedBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Devanagari UI";
  src: url("./assets/fonts/NotoSansDevanagari-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Ethiopic UI";
  src: url("./assets/fonts/NotoSansEthiopic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Yango Group Text", "Noto Sans Armenian UI", "Noto Sans Georgian UI", "Noto Sans Devanagari UI",
    "Noto Sans Ethiopic UI", "Arial", sans-serif;
}

/* Prevent new controls from falling back to browser fonts and grey buttons. */
:where(button, input, textarea, select) { font-family: var(--ui-font); }
:where(button) {
  appearance: none;
  border: var(--ui-border) solid currentColor;
  border-radius: var(--ui-radius);
  background: transparent;
  color: inherit;
  font-size: var(--ui-action);
  font-weight: 700;
  cursor: pointer;
}
:where(button, input, textarea, select, summary, a):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
:where(button):disabled { opacity: var(--ui-disabled); cursor: not-allowed; }

.app {
  display: flex;
  gap: 0;
  height: 100vh;
  height: 100dvh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px;
}

.sidebar {
  --ui-fg: var(--text-dark);
  --ui-inverse: var(--panel);
  width: 336px;
  min-width: 336px;
  height: 100%;
  background: var(--panel);
  color: var(--text-dark);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.brand-block {
  padding: 20px 12px 18px;
}

.brand-title {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Yango Group Headline", sans-serif;
  font-style: italic;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-title-yango {
  flex: 0 0 auto;
  font-size: 72px;
  line-height: 0.82;
  letter-spacing: 0;
}

.brand-title-product {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-width: 0;
  font-size: 38px;
  line-height: 0.7769;
  letter-spacing: 0;
}

.tab-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  border: 0;
  background: transparent;
  color: var(--text-dark);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  height: 28px;
  cursor: pointer;
}

.tab-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.tab-btn.is-active {
  background: #0e0e0e;
  color: var(--panel);
}

.tab-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.tab-panel.is-active {
  display: flex;
}

.tab-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.section {
  padding: var(--ui-padding);
  border-bottom: 1px solid var(--line);
}

#bannerMarkSection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 22px 22px;
  column-gap: 8px;
  row-gap: 4px;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 8px;
}

#bannerMarkSection .field-label {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  align-self: start;
}

#bannerMarkRow,
#bannerMarkRow .layout-accent-row {
  display: contents;
}

#bannerMarkRow .layout-type-group {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
}

.field-label {
  display: block;
  margin: 0 0 var(--ui-field-gap);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.field-label-muted {
  opacity: 1;
  margin-left: 4px;
}

.banner-counter-section {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 7px 9px;
  border: 1px solid rgba(229, 229, 229, 0.12);
  border-radius: var(--ui-radius);
  background: var(--bg);
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  opacity: 1;
  transition: opacity 160ms ease, background 160ms ease;
}

.banner-counter-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
}

.banner-counter-period {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px 0 0;
}

.banner-counter-month {
  min-width: 70px;
  max-width: 90px;
  min-height: 24px;
  padding: 0 10px 0 0;
  border: 0;
  background: transparent;
  color: rgba(229, 229, 229, 0.82);
  color-scheme: dark;
  font: inherit;
  font-size: var(--ui-label);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  outline: none;
}

.banner-counter-period + .banner-counter-item {
  border-left: 1px solid rgba(229, 229, 229, 0.14);
}

.banner-counter-item:last-child {
  padding-right: 0;
}

.banner-counter-item + .banner-counter-item {
  border-left: 1px solid rgba(229, 229, 229, 0.14);
}

.banner-counter-section:hover,
.banner-counter-section:focus-within,
.banner-counter-section:has(.operation-panel[open]) {
  background: var(--bg);
  opacity: 1;
}

.banner-counter-section:has(.operation-panel[open]) {
  opacity: 1;
}

.banner-counter-label {
  font-size: var(--ui-label);
  font-weight: 400;
  text-transform: uppercase;
  color: inherit;
}

.banner-counter-value {
  min-width: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.text-input,
.text-area {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 700;
  font-family: "Yango Group Text", "Arial", sans-serif;
  line-height: 1.25;
  padding: 2px 0;
  resize: vertical;
}

.text-input::placeholder {
  color: rgba(14, 14, 14, 0.45);
}

#bannerDriveServiceCustomInput {
  margin-top: 12px;
}

.text-area::placeholder {
  color: rgba(14, 14, 14, 0.55);
}

.text-area-compact {
  min-height: 36px;
  max-height: 90px;
}

.image-text-area {
  min-height: 48px;
  max-height: 112px;
}

.edit-prompt-hint {
  margin: 6px 0 0;
  color: rgba(14, 14, 14, 0.62);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.select-section {
  padding-bottom: 8px;
}

.static-field-value {
  margin: 0;
  color: #0e0e0e;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.select-wrap {
  width: 100%;
  position: relative;
}

.select-toggle {
  width: 100%;
  min-height: var(--ui-control);
  border: 0;
  padding: 0;
  background: transparent;
  color: #0e0e0e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.select-toggle:disabled {
  cursor: not-allowed;
  opacity: var(--ui-disabled);
}

.select-display {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
}

.select-chevron-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: block;
}

.select-menu {
  margin-top: var(--ui-field-gap);
  max-height: 128px;
  overflow-y: auto;
  width: 100%;
  padding: 2px 0;
  overscroll-behavior: contain;
}

.select-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #0e0e0e;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  min-height: 24px;
  padding: 2px 0;
  margin: 0;
  cursor: pointer;
  transition: opacity var(--ui-duration) ease;
}

.select-option:hover,
.select-option:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.select-option.is-active {
  font-weight: 700;
}

.select-option-with-image {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  line-height: 1.12;
}

.select-option-with-image:hover,
.select-option-with-image:focus-visible {
  font-size: 16px;
}

.select-option-image {
  width: 58px;
  height: 38px;
  object-fit: contain;
  background: #f6f6f6;
}

.car-model-custom {
  margin-top: 6px;
  border-bottom: 1px solid rgba(14, 14, 14, 0.55);
  padding-bottom: 4px;
}

.car-model-custom .text-input {
  height: 22px;
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--ui-radius);
  padding: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.swatch-core {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 1px solid rgba(14, 14, 14, 0.1);
}

.swatch.is-active {
  box-shadow: inset 0 0 0 1px #0e0e0e;
}

.swatch.is-picker {
  position: relative;
}

.swatch.is-picker .swatch-core {
  background: linear-gradient(
    180deg,
    #ff0000 0%,
    #ffae00 25%,
    #3cff00 50%,
    #039aff 74.5%,
    #dd00ff 100%
  ) !important;
}

.swatch-picker-glyph {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 9px;
  line-height: 1;
  color: rgba(14, 14, 14, 0.85);
  pointer-events: none;
}

.angle-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-chip-gap);
}

#natureLocationDetails {
  margin-top: 12px;
}

.angle-row.is-brand-grouped {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ui-chip-gap);
}

.brand-selector-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-chip-gap);
}

.angle-chip,
.crm-placement-chip {
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
  background: transparent;
  color: #0e0e0e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--ui-chip-font);
  height: var(--ui-chip);
  min-height: var(--ui-chip);
  min-width: var(--ui-chip);
  font-weight: 700;
  text-transform: uppercase;
  /* Yango's uppercase ink sits above its line-box centre: move it down 1px. */
  padding: 2px 8px 0;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
}

.angle-chip.is-active {
  background: #0e0e0e;
  color: var(--panel);
}

.angle-chip.is-disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.layout-accent-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 22px;
}

.layout-type-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ui-chip-gap);
  width: 100%;
}

.layout-type-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-chip-gap);
  align-items: center;
  min-width: 0;
}

.layout-accent-group {
  display: flex;
  flex: 0 0 auto;
  gap: var(--ui-chip-gap);
  align-items: center;
}

.layout-accent-group.is-yandex-go {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  gap: var(--ui-chip-gap);
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
}

.accent-swatch-btn {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius);
  background: transparent;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.accent-swatch-btn.is-active {
  border-color: #0e0e0e;
}

.accent-swatch-core {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(14, 14, 14, 0.1);
  display: block;
}

.layout-accent-group.is-yandex-go .accent-swatch-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  padding: 2px;
}

.layout-accent-group.is-yandex-go .accent-swatch-core {
  width: 16px;
  height: 16px;
  border-radius: var(--ui-radius-small);
}

.source-section {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.source-left {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--ui-field-gap);
}

.source-left > .field-label { margin: 0; }

.source-status {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: none;
}

.selected-source {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.reference-scene-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reference-scene-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.reference-scene-preview:empty {
  display: none;
}

.reference-scene-item,
.icon-reference-item {
  position: relative;
  min-width: 0;
}

.reference-scene-item img,
.icon-reference-item img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
}

.reference-scene-item span,
.icon-reference-item > span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.reference-scene-item button {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #0e0e0e;
  border-radius: 50%;
  background: #fff;
  color: #0e0e0e;
  font: 800 14px/16px Arial, sans-serif;
  cursor: pointer;
}

.seedream-layers-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.seedream-layers-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.seedream-layer-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 34px 34px;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid currentColor;
  padding: 5px;
}

.seedream-layer-row.is-selected {
  outline: 2px solid #59bfff;
  outline-offset: -2px;
}

.seedream-layer-toggle,
.seedream-layer-order-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.seedream-layer-toggle.is-hidden-layer {
  opacity: 0.35;
}

.seedream-layer-copy {
  min-width: 0;
  cursor: pointer;
}

.seedream-layer-name,
.seedream-layer-description {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seedream-layer-name {
  font-weight: 700;
}

.seedream-layer-description {
  font-size: 12px;
  opacity: 0.65;
}

.seedream-layer-edit-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.seedream-layer-edit-btn {
  min-height: 46px;
}

.seedream-layer-edit-panel .edit-instruction-input {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  caret-color: currentColor;
}

.seedream-layer-edit-panel .edit-instruction-input::placeholder {
  color: currentColor;
  opacity: 0.55;
}

.seedream-layer-reference-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seedream-layer-edit-panel .seedream-layer-reference-btn,
.seedream-layer-edit-panel .seedream-add-layer-btn {
  border-color: currentColor;
  color: inherit;
  flex: 1;
}

.seedream-layer-reference-preview-box {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid currentColor;
  flex: 0 0 46px;
}

.seedream-layer-reference-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seedream-layer-reference-clear {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.seedream-editor-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.seedream-editor-canvas.is-cropping {
  cursor: crosshair;
}

.seedream-editor-canvas.is-dragging {
  cursor: grabbing;
}

.selected-source-preview-wrap {
  width: 32px;
  height: 32px;
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
  padding: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-source-preview {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
  display: block;
  background: rgba(14, 14, 14, 0.12);
}

.clear-source-btn {
  width: 12px;
  height: 12px;
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.clear-source-glyph {
  position: relative;
  width: 4px;
  height: 4px;
  display: block;
}

.clear-source-glyph::before,
.clear-source-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 1px;
  background: currentColor;
  transform-origin: center;
  margin-left: -2.5px;
  margin-top: -0.5px;
}

.clear-source-glyph::before {
  transform: rotate(45deg);
}

.clear-source-glyph::after {
  transform: rotate(-45deg);
}

.upload-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
  background: transparent;
  color: #0e0e0e;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.upload-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.file-input-hidden {
  display: none;
}

.text-sets-host {
  border-bottom: 0;
}

.text-set-card {
  border-bottom: 0;
  padding: 12px;
}

.text-set-card + .text-set-card {
  border-top: 1px solid var(--line);
}

.text-set-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.text-set-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.text-set-header .text-set-title {
  margin: 0;
}

.text-set-remove-btn {
  border: 0;
  background: transparent;
  color: #0e0e0e;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16px;
  opacity: 0.3;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.text-set-remove-btn:hover {
  opacity: 0.6;
}

.banner-language-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.banner-language-select {
  width: 112px;
  height: 22px;
  border: 0;
  border-bottom: 1px solid rgba(14, 14, 14, 0.55);
  border-radius: 0;
  outline: none;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #0e0e0e 50%) right 5px center / 5px 5px no-repeat,
    linear-gradient(135deg, #0e0e0e 50%, transparent 50%) right 0 center / 5px 5px no-repeat;
  color: #0e0e0e;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 0 16px 2px 0;
  cursor: pointer;
}

.banner-language-select:focus-visible {
  border-bottom-color: #0e0e0e;
}

.text-image-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.text-image-picker-label {
  flex: 0 0 auto;
}

.text-image-picker-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.text-image-picker-btn {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(14, 14, 14, 0.25);
  border-radius: 6px;
  background: transparent;
  color: rgba(14, 14, 14, 0.58);
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.text-image-picker-btn.is-active {
  border-color: #0e0e0e;
  background: #0e0e0e;
  color: #f4f1e8;
}

.text-set-field + .text-set-field {
  margin-top: 6px;
}

.headline-size-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.headline-size-label {
  flex: 0 0 auto;
}

.headline-size-options {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(14, 14, 14, 0.18);
  border-radius: var(--ui-radius);
}

.headline-size-btn {
  min-width: 28px;
  height: 26px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(14, 14, 14, 0.55);
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.headline-size-btn.is-active {
  background: #0e0e0e;
  color: var(--panel);
}

.badge-toggle-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge-toggle-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 36px;
  height: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.badge-toggle-icon {
  width: 36px;
  height: 10px;
  display: block;
}

.badge-fields-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.badge-field-col {
  margin-top: 0;
}

.badge-edit-scope-row {
  margin-top: 10px;
  min-height: 24px;
}

.text-edit-scope-row {
  margin-top: 8px;
}

.inline-style-helper {
  margin: 4px 0 8px;
  color: rgba(14, 14, 14, 0.45);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.text-scope-label {
  color: rgba(14, 14, 14, 0.6);
}

.text-scope-label.is-banner-specific {
  color: #0e0e0e;
}

.badge-scope-label {
  color: rgba(14, 14, 14, 0.6);
}

.badge-scope-label.is-banner-specific {
  color: #0e0e0e;
}

.badge-shift-wrap,
.disclaimer-controls {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.text-align-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.text-align-btn {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius);
  background: transparent;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.text-align-btn.is-active {
  border-color: #0e0e0e;
}

.vertical-align-btn.is-vertical-first {
  margin-left: 8px;
}

.text-align-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.text-set-field .text-area {
  resize: none;
  overflow: hidden;
  min-height: 28px;
  line-height: 1.22;
  padding-top: 1px;
  padding-bottom: 3px;
}

.text-set-field .field-label {
  margin-bottom: 6px;
}

.shift-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shift-scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  margin-bottom: 6px;
}

.shift-scope-label {
  color: rgba(14, 14, 14, 0.72);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.shift-scope-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shift-reset-btn {
  border: 1px solid rgba(14, 14, 14, 0.34);
  color: rgba(14, 14, 14, 0.82);
  background: transparent;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.shift-reset-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.shift-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.shift-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: rgba(14, 14, 14, 0.85);
}

.shift-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 0;
  height: 24px;
  background: transparent;
}

.shift-slider:focus {
  outline: none;
}

.shift-slider::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(
    to right,
    #0e0e0e 0%,
    #0e0e0e var(--fill, 0%),
    rgba(0, 0, 0, 0.1) var(--fill, 0%),
    rgba(0, 0, 0, 0.1) 100%
  );
}

.shift-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 3px;
  height: 12px;
  margin-top: -5.5px;
  border: 0;
  border-radius: 0;
  background: #0e0e0e;
}

.shift-slider::-moz-range-track {
  height: 1px;
  border: 0;
  background: rgba(0, 0, 0, 0.1);
}

.shift-slider::-moz-range-progress {
  height: 1px;
  background: #0e0e0e;
}

.shift-slider::-moz-range-thumb {
  width: 3px;
  height: 12px;
  border: 0;
  border-radius: 0;
  background: #0e0e0e;
}

.add-set-btn {
  width: 100%;
  height: 36px;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #0e0e0e;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.add-set-btn:hover {
  background: #0e0e0e;
  color: var(--panel);
}

.rida-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 12px;
}

#ridaItemsSection {
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
  border-bottom: 0;
}

.rida-item-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.rida-item-card:last-child {
  border-bottom: 0;
}

.rida-item-header,
.rida-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rida-item-title,
.rida-sub-label {
  margin: 0;
}

.rida-sub-label {
  padding-top: 4px;
}

.rida-item-remove,
.rida-helper-btn {
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
  background: transparent;
  color: #0e0e0e;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
  text-transform: uppercase;
  cursor: pointer;
}

.rida-helper-btn {
  font-size: 10px;
  padding: 9px 12px;
}

.rida-item-remove:hover,
.rida-helper-btn:hover:not(:disabled) {
  background: #0e0e0e;
  color: var(--panel);
}

.rida-helper-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.rida-brief-textarea {
  min-height: 72px;
}

.rida-add-btn {
  margin-top: 8px;
}

.section-generate {
  padding: 0;
  border-top: 1px solid var(--line);
}

.generate-btn {
  width: 100%;
  min-height: var(--ui-primary);
  padding: 12px;
  border: 0;
  background: transparent;
  color: #0e0e0e;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.generate-btn:hover {
  background: #0e0e0e;
  color: var(--panel);
}

.generate-btn:disabled,
.canvas-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.canvas {
  flex: 1;
  min-width: 0;
  margin-left: 32px;
  border: 1px solid var(--soft-line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.canvas-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  min-height: var(--canvas-header);
  flex-shrink: 0;
  padding: 12px var(--canvas-gutter);
}

.canvas-section-label { margin: 0 auto 0 0; font: 700 var(--ui-action)/1.2 var(--ui-font); text-transform: uppercase; }

.canvas-action-btn {
  border: 1px solid rgba(229, 229, 229, 0.3);
  background: transparent;
  color: #e5e5e5;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 20px;
  cursor: pointer;
  white-space: normal;
}

.canvas-action-btn.is-active {
  border-color: #59bfff;
  color: #59bfff;
}

.tab-canvas {
  display: none;
  flex: 1;
  min-height: 0;
}

.tab-canvas.is-active {
  display: flex;
}

#videoCanvas {
  overflow-y: auto;
  align-items: flex-start;
}

.image-workspace {
  width: 100%;
  padding: 12px var(--canvas-gutter) 24px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-preview-frame {
  --preview-ratio: 1.333333;
  --preview-aspect-ratio: 4 / 3;
  width: min(100%, calc((100vh - 190px) * var(--preview-ratio)));
  max-width: 900px;
  max-height: calc(100vh - 190px);
  aspect-ratio: var(--preview-aspect-ratio);
  border: 0;
  background: transparent;
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

.lucky-canvas-results {
  width: min(100%, 980px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lucky-style-row {
  margin-bottom: 16px;
}

.lucky-style-chip {
  font-size: 10px;
}

.lucky-split-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.lucky-feedback-clear {
  border-color: #0e0e0e;
  background: transparent;
}

.lucky-canvas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lucky-canvas-grid .lucky-result-card {
  aspect-ratio: 3 / 2;
  border-color: rgba(244, 241, 232, 0.22);
  background: rgba(244, 241, 232, 0.04);
}

.lucky-canvas-grid .lucky-result-card.is-square-result {
  aspect-ratio: 1 / 1;
  background: #f3f0e7;
}

.lucky-canvas-grid .lucky-result-card.is-square-result .lucky-result-image {
  object-fit: contain;
}

.lucky-canvas-grid .lucky-result-card.is-active {
  border-color: #e3ff74;
  box-shadow: inset 0 0 0 2px #e3ff74;
}

.lucky-result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lucky-result-actions .generate-btn {
  width: min(100%, 260px);
}

.lucky-result-actions .icon-export-btn {
  flex: 0 1 260px;
}

.result-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.expanded-edit-overlay {
  position: absolute;
  border: 1px dashed rgba(227, 255, 116, 0.86);
  background: rgba(227, 255, 116, 0.08);
  cursor: crosshair;
  touch-action: none;
  z-index: 3;
}

.expanded-edit-selection {
  position: absolute;
  border: 2px solid #e3ff74;
  background: rgba(227, 255, 116, 0.18);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.prompt-row {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--soft-line);
  background: rgba(188, 188, 188, 0.05);
  display: flex;
  align-items: flex-end;
  padding: 8px;
  gap: 8px;
}

.quick-action-row {
  max-width: 900px;
  width: 100%;
  margin: 8px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-action-btn {
  border: 1px solid #bcbcbc;
  background: transparent;
  color: #bcbcbc;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  padding: 10px 12px;
}

.quick-action-btn:hover:not(:disabled) {
  background: #bcbcbc;
  color: #0e0e0e;
}

.quick-action-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.prompt-input {
  flex: 1;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: #bcbcbc;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  min-height: 42px;
}

.prompt-reference-box {
  width: 42px;
  height: 42px;
  position: relative;
  flex: 0 0 42px;
  border: 1px solid #bcbcbc;
  background: rgba(188, 188, 188, 0.08);
}

.prompt-reference-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.prompt-reference-clear-btn {
  width: 16px;
  height: 16px;
  position: absolute;
  top: -6px;
  right: -6px;
  border: 1px solid #bcbcbc;
  border-radius: 50%;
  background: #0e0e0e;
  color: #bcbcbc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 1px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.prompt-reference-upload-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #bcbcbc;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.prompt-reference-upload-btn img {
  width: 16px;
  height: 16px;
  filter: invert(77%);
}

.prompt-reference-upload-btn:hover:not(:disabled),
.prompt-reference-clear-btn:hover:not(:disabled) {
  background: #bcbcbc;
  color: #0e0e0e;
}

.prompt-reference-upload-btn:hover:not(:disabled) img {
  filter: none;
}

.prompt-apply-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #bcbcbc;
  background: transparent;
  color: #bcbcbc;
  cursor: pointer;
}

.prompt-back-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #bcbcbc;
  background: transparent;
  color: #bcbcbc;
  cursor: pointer;
}

.glitch-fix-btn {
  min-height: 32px;
  border: 1px solid #ff1616;
  background: transparent;
  color: #ff1616;
  padding: 0 12px;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.glitch-fix-btn:hover:not(:disabled) {
  background: #ff1616;
  color: #ffffff;
}

.glitch-fix-status {
  max-width: 900px;
  width: 100%;
  margin: 8px auto 0;
  color: #bcbcbc;
  font-size: 12px;
  line-height: 1.4;
}

.glitch-fix-status.is-success {
  color: #81d987;
}

.glitch-fix-status.is-warning {
  color: #ff9d66;
}

.prompt-back-btn:disabled,
.prompt-apply-btn:disabled,
.glitch-fix-btn:disabled,
.prompt-reference-upload-btn:disabled,
.prompt-reference-clear-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.video-helper-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(14, 14, 14, 0.72);
}

.video-generation-access-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-generation-password-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(14, 14, 14, 0.24);
  border-radius: 0;
  background: rgba(14, 14, 14, 0.03);
  color: var(--text-dark);
  padding: 0 12px;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 13px;
  outline: none;
}

.video-generation-password-input:focus {
  border-color: #0e0e0e;
  background: rgba(14, 14, 14, 0.06);
}

.video-duration-label {
  margin-top: 8px;
}

.video-duration-options .angle-chip:disabled {
  pointer-events: none;
}

.video-ugc-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-ugc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.video-ugc-field .video-title-slot {
  margin: 0;
}

.video-ugc-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 10px;
}

.video-ugc-age-field .text-input {
  text-align: center;
}

.video-ugc-compact-textarea {
  min-height: 78px;
}

.video-ugc-portrait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.video-ugc-portrait-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  border: 2px solid transparent;
  background: rgba(14, 14, 14, 0.03);
  padding: 6px;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
}

.video-ugc-portrait-card.is-active {
  border-color: #ff1616;
  background: rgba(255, 22, 22, 0.08);
}

.video-ugc-portrait-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #b8b8b8;
}

.video-ugc-portrait-copy {
  display: block;
  overflow: hidden;
  color: rgba(14, 14, 14, 0.68);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-ugc-canvas {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  color: #f4f1e8;
}

.video-ugc-canvas-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.video-ugc-canvas-eyebrow {
  margin: 0 0 6px;
  color: #ff3b22;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.video-ugc-canvas-title {
  margin: 0;
  font-family: "Yango Group Headline", Arial, sans-serif;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.95;
  text-transform: uppercase;
}

.video-ugc-canvas-status {
  margin: 10px 0 0;
  color: rgba(244, 241, 232, 0.62);
  font-size: 14px;
  line-height: 1.35;
}

.video-ugc-upload-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(244, 241, 232, 0.24);
  background: transparent;
  color: #f4f1e8;
  padding: 0 16px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.video-ugc-upload-btn img {
  width: 16px;
  height: 16px;
  filter: invert(1);
}

.video-ugc-upload-btn:hover,
.video-ugc-upload-btn:focus-visible {
  border-color: #ff3b22;
  outline: none;
}

.video-ugc-canvas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.video-ugc-canvas-empty {
  grid-column: 1 / -1;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(244, 241, 232, 0.2);
  color: rgba(244, 241, 232, 0.46);
  text-align: center;
}

.video-ugc-canvas-empty strong {
  color: #f4f1e8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-ugc-canvas-card {
  position: relative;
  min-width: 0;
  border: 2px solid rgba(244, 241, 232, 0.12);
  background: #191919;
  color: #f4f1e8;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.video-ugc-canvas-card:hover,
.video-ugc-canvas-card:focus-visible {
  border-color: rgba(244, 241, 232, 0.52);
  outline: none;
  transform: translateY(-2px);
}

.video-ugc-canvas-card.is-active {
  border-color: #ff3b22;
  box-shadow: 0 0 0 4px rgba(255, 59, 34, 0.2);
}

.video-ugc-canvas-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #777;
}

.video-ugc-selected-badge,
.video-ugc-option-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-ugc-option-badge {
  left: 10px;
  min-width: 26px;
  background: rgba(14, 14, 14, 0.74);
  color: #fff;
}

.video-ugc-selected-badge {
  right: 10px;
  background: #ff3b22;
  color: #0e0e0e;
}

.video-ugc-canvas-card-copy {
  padding: 12px;
}

.video-ugc-canvas-card-title {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.video-ugc-card-actions {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.video-ugc-card-action {
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(244, 241, 232, 0.22);
  background: transparent;
  color: #f4f1e8;
  padding: 0 8px;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.video-ugc-card-action:hover,
.video-ugc-card-action:focus-visible {
  border-color: #ff3b22;
  outline: none;
}

.video-ugc-card-action:disabled {
  opacity: 0.5;
  cursor: default;
}

.video-ugc-card-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #f4f1e8;
  color: #0e0e0e;
}

.video-ugc-card-download img {
  width: 16px;
  height: 16px;
}

.video-ugc-edit-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(244, 241, 232, 0.12);
  padding: 10px 12px 12px;
}

.video-ugc-edit-input {
  width: 100%;
  min-height: 72px;
  border: 1px solid rgba(244, 241, 232, 0.2);
  background: #0e0e0e;
  color: #f4f1e8;
  padding: 9px;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  resize: vertical;
  outline: none;
}

.video-ugc-edit-input:focus {
  border-color: #ff3b22;
}

.video-ugc-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.video-ugc-edit-apply {
  background: #ff3b22;
  border-color: #ff3b22;
  color: #0e0e0e;
}

.video-ugc-saved-section {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(244, 241, 232, 0.12);
}

.video-ugc-saved-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.video-ugc-saved-heading h3 {
  margin: 0;
  font-size: 16px;
  text-transform: uppercase;
}

.video-ugc-saved-heading span {
  color: rgba(244, 241, 232, 0.5);
  font-size: 12px;
}

.video-result-card.has-ugc-portraits {
  border: 0;
  background: transparent;
  padding: 0;
}

.video-result-card.has-ugc-portraits .video-empty-state {
  min-height: 0;
  align-items: flex-start;
  border: 0;
  background: transparent;
  padding: 0;
}

.video-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.video-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.mini-action-btn {
  min-height: 28px;
  border: 1px solid rgba(14, 14, 14, 0.16);
  background: #0e0e0e;
  color: #f4f1e8;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.mini-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mini-action-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-color: rgba(14, 14, 14, 0.28);
  background: transparent;
  color: #0e0e0e;
}

.mini-action-icon {
  width: 14px;
  height: 14px;
}

.video-story-input {
  width: 100%;
  min-height: 132px;
  border: 1px solid rgba(14, 14, 14, 0.12);
  background: rgba(14, 14, 14, 0.02);
  color: var(--text-dark);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
  font-family: "Yango Group Text", "Arial", sans-serif;
  resize: vertical;
  outline: none;
}

.video-story-input::placeholder {
  color: rgba(14, 14, 14, 0.34);
}

#videoVoiceoverWishInput {
  min-height: 64px;
  height: 64px;
  margin-top: 0;
  overflow-y: hidden;
  resize: none;
}

.video-standard-generate-btn {
  width: 100%;
  margin-top: 8px;
}

.video-car-branding-preset-select {
  width: 100%;
  margin-top: 8px;
}

.video-ugc-current-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.video-ugc-gallery-link {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

.video-prompt-preview {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(14, 14, 14, 0.16);
  background: rgba(14, 14, 14, 0.04);
  color: var(--text-dark);
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  resize: vertical;
  outline: none;
}

.video-storyboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.video-storyboard-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 2px solid transparent;
  background: rgba(14, 14, 14, 0.03);
  padding: 6px;
  cursor: pointer;
  text-align: left;
}

.video-storyboard-card.is-active {
  border-color: #ff1616;
  background: rgba(255, 22, 22, 0.08);
}

.video-storyboard-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.video-storyboard-label {
  color: rgba(14, 14, 14, 0.74);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.video-title-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-packshot-mode-control {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.video-title-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-title-slot {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(14, 14, 14, 0.48);
}

.video-title-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(14, 14, 14, 0.12);
  background: rgba(14, 14, 14, 0.02);
  color: var(--text-dark);
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.1;
  font-family: "Yango Group Headline", "Arial", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  resize: vertical;
  outline: none;
}

.video-title-input::placeholder {
  color: rgba(14, 14, 14, 0.32);
}

.video-disclaimer-input {
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
}

.video-workspace {
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: stretch;
}

.video-result-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-result-card.is-empty-status,
.video-result-card.has-storyboards {
  border: 0;
  background: transparent;
  padding: 0;
}

.video-result-card.is-empty-status {
  justify-content: center;
}

.video-result-label {
  margin: 0;
  color: #f4f1e8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.video-result-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-empty-state {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
  padding: 24px;
}

.video-result-card.is-empty-status .video-empty-state,
.video-result-card.has-storyboards .video-empty-state {
  border: 0;
  background: transparent;
  padding: 0;
}

.video-result-card.is-empty-status .video-empty-state {
  min-height: min(70vh, 720px);
}

.video-result-card.has-storyboards .video-empty-state {
  min-height: 0;
  align-items: flex-start;
}

.video-canvas-storyboard-grid {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-self: stretch;
  justify-content: center;
}

.video-canvas-storyboard-card {
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.video-canvas-storyboard-card .video-storyboard-image {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.video-canvas-storyboard-card .video-storyboard-label {
  color: rgba(244, 241, 232, 0.78);
  font-size: 12px;
}

.video-safe-storyboard-card {
  cursor: default;
  border-color: rgba(255, 255, 255, 0.24);
}

.video-safe-storyboard-card .video-storyboard-label {
  color: #f4f1e8;
}

.video-empty-copy {
  margin: 0;
  max-width: 420px;
  color: rgba(244, 241, 232, 0.66);
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
}

.video-result-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #050505;
  object-fit: contain;
}

.video-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f4f1e8;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.source-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-library {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.source-library-empty {
  margin: 0;
  color: rgba(14, 14, 14, 0.6);
  font-size: 12px;
}

.source-library-toggle {
  border: 0;
  background: transparent;
  color: #0e0e0e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  padding: 0;
  cursor: pointer;
}

.source-library-toggle:disabled {
  opacity: 0.35;
  cursor: default;
}

.source-library-chevron {
  width: 16px;
  height: 16px;
  display: block;
}

.source-library-filter {
  position: relative;
  display: inline-flex;
  width: auto;
  max-width: 100%;
}

.source-library-filter-toggle {
  width: auto;
  max-width: 100%;
  min-height: 18px;
  border: 0;
  background: transparent;
  color: #0e0e0e;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.source-library-filter-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-library-filter-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: block;
}

.source-library-filter-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  min-width: 128px;
  width: max-content;
  max-width: 220px;
  max-height: 156px;
  overflow-y: auto;
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
  background: var(--panel);
  padding: 6px;
}

.source-library-filter-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: #0e0e0e;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  padding: 7px 6px;
  cursor: pointer;
}

.source-library-filter-option:hover,
.source-library-filter-option:focus-visible,
.source-library-filter-option.is-active {
  font-weight: 800;
}

.source-library-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lucky-result-card {
  position: relative;
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(14, 14, 14, 0.18);
  border-radius: var(--ui-radius);
  background: rgba(14, 14, 14, 0.06);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.lucky-result-card.is-active {
  border-color: #0e0e0e;
  box-shadow: inset 0 0 0 2px #0e0e0e;
}

.lucky-result-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.result-image-status {
  position: absolute;
  inset: 40px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #f4f1e8;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.is-square-result .result-image-status {
  color: #0e0e0e;
}

.result-image-retry {
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 8px 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.lucky-prompt-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 280px;
  padding: 14px;
  background: #101010;
  color: #f4f1e8;
  text-align: left;
  cursor: default;
}

.lucky-prompt-title {
  padding-right: 64px;
  color: #e3ff74;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.lucky-prompt-meta {
  color: rgba(244, 241, 232, 0.62);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.lucky-prompt-text {
  flex: 1;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #f4f1e8;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.lucky-result-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  min-height: 18px;
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.82);
  color: #f4f1e8;
  font-size: 9px;
  font-weight: 800;
  line-height: 18px;
  text-transform: uppercase;
  padding: 0 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lucky-result-edit {
  position: absolute;
  right: 7px;
  bottom: 7px;
  min-height: 22px;
  border: 1px solid rgba(244, 241, 232, 0.42);
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.82);
  color: #f4f1e8;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  padding: 0 9px;
  cursor: pointer;
}

.lucky-result-edit:hover,
.lucky-result-edit:focus-visible {
  border-color: #e3ff74;
  color: #e3ff74;
}

.image-card-quick-actions {
  position: absolute;
  top: 7px;
  left: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: calc(100% - 132px);
  pointer-events: none;
}

.image-card-quick-action {
  min-height: 22px;
  border: 1px solid rgba(244, 241, 232, 0.42);
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.82);
  color: #f4f1e8;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  padding: 0 8px;
  cursor: pointer;
  pointer-events: auto;
}

.image-card-quick-action:hover:not(:disabled),
.image-card-quick-action:focus-visible {
  border-color: #e3ff74;
  color: #e3ff74;
}

.image-card-quick-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.lucky-result-feedback {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  gap: 6px;
}

.lucky-result-feedback-btn {
  min-height: 22px;
  border: 1px solid rgba(244, 241, 232, 0.42);
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.82);
  color: #f4f1e8;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  padding: 0 9px;
  cursor: pointer;
}

.lucky-result-feedback-btn:hover,
.lucky-result-feedback-btn:focus-visible {
  border-color: #e3ff74;
  color: #e3ff74;
}

.banner-image-set-hint {
  color: rgba(14, 14, 14, 0.72);
}

.source-card-wrap {
  position: relative;
  width: 40px;
  height: 40px;
}

.source-card {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.source-card.is-active {
  border-color: #0e0e0e;
  box-shadow: inset 0 0 0 1px #0e0e0e;
}

.selected-source-count {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #0e0e0e;
  color: #f4f1e8;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

#selectedSourceBox > button.selected-source-preview-wrap,
#crmSelectedSourceBox > button.selected-source-preview-wrap {
  background: transparent;
  cursor: pointer;
}

/* Selected images use the same red surface and outline as sidebar menus. */
.selected-source-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 30;
  width: 224px;
  max-width: calc(100vw - 32px);
  padding: var(--ui-padding);
  border: var(--ui-border) solid var(--text-dark);
  border-radius: var(--ui-radius);
  background: var(--panel);
  color: var(--text-dark);
  box-shadow: var(--ui-shadow);
}
.selected-source-panel[hidden] { display: none; }
.selected-source-panel-heading {
  margin: 0 0 var(--ui-padding);
  font-size: var(--ui-label);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.selected-source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ui-space);
  max-height: 240px;
  overflow-y: auto;
  padding: 3px;
}
#foodPhotoSection .source-section { flex-wrap: wrap; }
.food-source-grid { flex: 0 0 100%; width: 100%; box-sizing: border-box; overflow: visible; }
.food-source-grid .selected-source-item { min-width: 0; }
.food-source-grid .selected-source-preview { width: 100%; aspect-ratio: 1; border: var(--ui-border) solid var(--text-dark); border-radius: var(--ui-radius); }
.selected-source-item { position: relative; }
.selected-source-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: var(--ui-border) solid var(--text-dark);
  border-radius: var(--ui-radius);
}

.source-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: rgba(14, 14, 14, 0.12);
}

.source-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: rgba(14, 14, 14, 0.12);
  pointer-events: none;
}

.source-card-hover-preview {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: 12px;
  display: block;
  width: min(280px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 1px solid rgba(14, 14, 14, 0.18);
  border-radius: var(--ui-radius);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(14, 14, 14, 0.28);
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.96);
  transform-origin: center;
  transition: opacity 140ms ease, transform 140ms ease;
}

.source-card-hover-preview.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.source-card-delete,
.selected-source-remove {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 16px;
  height: 16px;
  color: var(--text-dark);
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.source-card-asset {
  position: absolute;
  z-index: 2;
  left: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border: 1px solid #0e0e0e;
  border-radius: 999px;
  background: #e3ff74;
  color: #0e0e0e;
  font-size: 8px;
  font-weight: 900;
  line-height: 14px;
  padding: 0;
  text-align: center;
  cursor: pointer;
}

.source-card-delete-glyph {
  position: relative;
  width: 6px;
  height: 6px;
  display: block;
}

.source-card-delete-glyph::before,
.source-card-delete-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 1px;
  background: currentColor;
  transform-origin: center;
  margin-left: -3px;
  margin-top: -0.5px;
}

.source-card-delete-glyph::before {
  transform: rotate(45deg);
}

.source-card-delete-glyph::after {
  transform: rotate(-45deg);
}

.banner-sets-view {
  width: 100%;
  padding: 12px var(--canvas-gutter) 24px;
  min-width: 0;
  overflow: auto;
}

.banner-set {
  max-width: 900px;
  margin: 0 0 24px;
}

.banner-set-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.banner-set-grid {
  display: grid;
  grid-template-columns: minmax(0, 300fr) minmax(0, 264fr) minmax(0, 300fr);
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  max-width: 900px;
}

.banner-col-left,
.banner-col-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.banner-col-mid {
  min-width: 0;
}

.banner-slot {
  position: relative;
  border: 1px solid var(--soft-line);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: pointer;
}

.banner-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  pointer-events: none;
}

.banner-slot:hover::after,
.banner-slot:focus-visible::after,
.banner-slot.is-active::after {
  border-color: rgba(255, 255, 255, 0.9);
}

.banner-slot.has-position-override::before {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  z-index: 2;
  width: 7px;
  height: 7px;
  background: #ff1a1a;
}

.banner-slot.has-fit-height::before {
  width: 9px;
  height: 9px;
  background: #c8ff4d;
}

.banner-fit-height-btn {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  transform: translateY(5px);
  opacity: 0;
  pointer-events: none;
  min-width: 0;
  min-height: 24px;
  border: 1px solid rgba(244, 241, 232, 0.6);
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.82);
  color: #f4f1e8;
  padding: 0 9px;
  font-family: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 120ms ease, transform 120ms ease, background 120ms ease;
}

.banner-slot:hover .banner-fit-height-btn,
.banner-slot:focus-within .banner-fit-height-btn,
.banner-slot.is-active .banner-fit-height-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.banner-fit-height-btn:hover {
  border-color: #e3ff74;
  color: #e3ff74;
}

.banner-slot.has-fit-height .banner-fit-height-btn {
  border-color: #c8ff4d;
  background: rgba(200, 255, 77, 0.92);
  color: #0e0e0e;
}

.banner-fit-height-btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

.banner-dirty-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  border: 1px solid rgba(227, 255, 116, 0.72);
  border-radius: 999px;
  background: rgba(14, 14, 14, 0.84);
  color: #e3ff74;
  padding: 5px 8px 4px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.slot-1200x1200 {
  width: 100%;
  aspect-ratio: 1;
}

.slot-1200x628 {
  width: 100%;
  aspect-ratio: 1200 / 628;
}

.slot-1080x1920 {
  width: 100%;
  aspect-ratio: 1080 / 1920;
}

.slot-1200x1500 {
  width: 100%;
  aspect-ratio: 1200 / 1500;
}

.banner-slot img,
.banner-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.crm-placement-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-placement-group {
  display: grid;
  gap: 5px;
}

.crm-placement-group-separated {
  border-top: 1px solid rgba(14, 14, 14, 0.18);
  padding-top: 8px;
}

.crm-placement-group-label {
  color: rgba(14, 14, 14, 0.62);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.crm-placement-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-chip-gap);
}

.crm-placement-chip.is-active {
  background: #0e0e0e;
  color: var(--panel);
}

.crm-badge-section {
  display: grid;
  gap: var(--ui-group-gap);
}

.crm-compact-field {
  display: grid;
  align-items: start;
  min-width: 0;
  gap: var(--ui-field-gap);
}

.crm-compact-field > .field-label {
  margin: 0;
}

#crmGoOfferField,
#crmGoValueField,
.crm-go-control {
  display: grid;
}

#crmGoOfferField,
#crmGoValueField {
  gap: var(--ui-group-gap, 16px);
}

.crm-go-control {
  min-width: 0;
  gap: var(--ui-field-gap, 6px);
}

.crm-go-control > .field-label {
  margin: 0;
}

.crm-go-control > .ui-button {
  justify-self: start;
}

#crmGoCountry {
  height: var(--ui-control);
  padding: 0 28px 0 0;
  appearance: none;
  background: url("./assets/icons/ChevronDownM.svg") right center / 20px 20px no-repeat;
  font-size: var(--ui-value);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

#crmGoCountry:disabled {
  opacity: var(--ui-disabled);
  cursor: not-allowed;
}

#crmGoModeRow .angle-chip,
#crmGoTypeRow .angle-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px 0;
  font-size: 8px;
}

#crmGoValueField {
  margin: 0;
}

#crmGoValueInput {
  min-height: 24px;
}

#crmGoPreview {
  margin-top: calc(4px - var(--ui-field-gap, 6px));
  font-size: var(--ui-body);
  font-weight: 400;
  line-height: 1.4;
}

#crmGoPreview:empty {
  display: none;
}

.crm-badge-section .text-input:focus-visible {
  outline: 2px solid var(--text-dark);
  outline-offset: 3px;
}

.crm-fade-color-row {
  display: grid;
  grid-template-columns: repeat(5, 30px);
  gap: 4px;
}

.crm-fade-color-row .accent-swatch-btn {
  width: 30px;
  height: 30px;
}

.crm-logo-field {
  grid-column: 1 / -1;
}

.crm-logo-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.crm-logo-upload-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.crm-logo-preview-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--ui-radius);
  background: #141414;
  overflow: hidden;
}

.crm-logo-preview {
  display: block;
  max-width: 92px;
  max-height: 30px;
  object-fit: contain;
}

.crm-logo-clear-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  font-size: 13px;
  line-height: 18px;
}

.crm-preview-grid {
  display: block;
  column-width: 220px;
  column-gap: 14px;
}

.crm-set {
  max-width: 100%;
  margin-bottom: 12px;
}

.crm-preview-item {
  min-width: 0;
  break-inside: avoid;
  margin: 0 0 14px;
}

.crm-preview-title {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.crm-slot {
  width: 100%;
  max-height: 320px;
  cursor: default;
}

.crm-slot.crm-story-preview-slot {
  max-width: calc(320px * 750 / 1624);
  max-height: none;
}

.crm-tall-ticket-draft {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

.crm-slot .crm-tall-ticket-draft > img {
  position: absolute;
  max-width: none;
  object-fit: fill;
}

.crm-tall-ticket-draft > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.crm-tall-ticket-draft rect {
  fill: none;
  stroke: var(--text-light);
  stroke-width: 2;
  stroke-dasharray: 8 6;
  filter: drop-shadow(0 1px 1px var(--bg));
}

.crm-slot img {
  height: 100%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.02);
}

.crm-set-actions {
  width: 100%;
  margin-top: 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.banner-download-clean-btn {
  min-width: 150px;
}

.crm-text-card .text-set-title {
  line-height: 1.25;
}

.crm-text-card {
  background: #fd2501;
  color: #0e0e0e;
}

.crm-text-set-header {
  align-items: center;
  margin-bottom: 10px;
  padding-top: 10px;
}

.crm-text-group-hint {
  margin: -2px 0 12px;
  color: rgba(14, 14, 14, 0.72);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.35;
}

.crm-edit-shared-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.crm-text-target-hint {
  font-weight: 800;
}

.crm-disclaimer-card {
  padding-top: 10px;
}

.crm-disclaimer-toggle-row {
  margin-top: 0;
  min-height: 20px;
}

.crm-disclaimer-toggle-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.crm-feed-inline-toggle {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.crm-feed-position-chip {
  padding: 5px 7px;
  font-size: 7px;
}

.crm-text-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-text-option-field {
  margin-top: 0;
}

.crm-disclaimer-case {
  display: grid;
  gap: var(--ui-field-gap);
  margin-top: var(--ui-group-gap);
}

.crm-disclaimer-case > .field-label,
.crm-disclaimer-case > .crm-text-group-hint {
  margin: 0;
}

.crm-disclaimer-case .ui-button {
  text-transform: none;
}

.crm-disclaimer-case .angle-row .ui-button[aria-pressed="true"] {
  background: var(--ui-fg);
  border-color: var(--ui-fg);
  color: var(--ui-inverse);
}

.crm-text-option-field + .crm-text-option-field {
  margin-top: 0;
}

.crm-text-card .field-label {
  color: #0e0e0e;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16px;
  line-height: 1;
  text-transform: uppercase;
}

.crm-text-area {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0e0e0e;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  outline: none;
  padding: 4px 0 0;
}

.crm-text-area:focus {
  box-shadow: inset 0 -1px 0 #0e0e0e;
}

.crm-text-area.is-mixed::placeholder {
  color: rgba(14, 14, 14, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.crm-text-options-block {
  margin-top: 12px;
  padding-bottom: 10px;
}

.crm-text-options-label {
  margin: 0 0 8px;
}

.crm-text-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.crm-text-option-btn {
  width: 20px;
  height: 20px;
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
  background: transparent;
  color: #0e0e0e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Yango Group Text", "Arial", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.crm-text-option-btn.is-active {
  background: #0e0e0e;
  color: #fd2501;
}

.crm-text-option-label {
  display: block;
  line-height: 1;
  transform: translateY(1px);
}

.crm-text-option-add-btn {
  font-size: 13px;
}

.crm-text-option-add-btn:hover {
  background: #0e0e0e;
  color: #fd2501;
}

.crm-text-option-remove-btn {
  opacity: 0.45;
}

.banner-slot-placeholder {
  position: absolute;
  left: 8px;
  top: 6px;
  color: rgba(188, 188, 188, 0.32);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.banner-slot-placeholder-label {
  display: inline-block;
}

.banner-set-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space);
  justify-content: flex-end;
}

/* Animate rows under Download take a full line each, so Download, Animate and the note stack. */
.banner-set-actions > .banner-animate-row,
.banner-set-actions > .banner-animate-note {
  flex-basis: 100%;
}

/* Animate row under Download: style picker (Random by default) + action, same family as Download. */
.banner-animate-row {
  display: flex;
  gap: var(--ui-space);
  justify-content: flex-end;
}
.banner-animate-row .banner-download-btn {
  padding: 10px 16px;
  white-space: nowrap;
}
.banner-animate-select {
  min-height: 100%;
  padding: 0 28px 0 12px;
  border: 1px solid rgba(229, 229, 229, 0.3);
  border-radius: var(--ui-radius);
  background: transparent;
  color: #e5e5e5;
  font: 700 12px/1.2 var(--ui-font);
  text-transform: uppercase;
  cursor: pointer;
}
.banner-animate-select option {
  background: var(--bg);
  color: var(--text-light);
  text-transform: none;
}
.banner-animate-select:focus-visible {
  outline: 2px solid #e5e5e5;
  outline-offset: 2px;
}
.banner-animate-note {
  margin: 0;
  color: #e5e5e5;
  opacity: 0.65;
  font: 400 var(--ui-body)/1.4 var(--ui-font);
}
.banner-animate-select:disabled {
  opacity: var(--ui-disabled);
  cursor: not-allowed;
}

.banner-download-btn {
  border: 1px solid rgba(229, 229, 229, 0.3);
  color: #e5e5e5;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 24px;
  background: transparent;
  cursor: pointer;
}

.loader {
  position: absolute;
  left: 56px;
  top: 14px;
  color: #e5e5e5;
  font-size: 12px;
  text-transform: uppercase;
}

.experiment-progress {
  position: absolute;
  left: 56px;
  top: 52px;
  width: min(520px, calc(100% - 112px));
  padding: 18px 20px;
  border: 1px solid #303030;
  background: rgba(14, 14, 14, 0.92);
  color: #f0f0f0;
  z-index: 4;
}

.experiment-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
}

.experiment-progress-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.experiment-progress-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  opacity: 0.78;
}

.experiment-progress-item.is-active,
.experiment-progress-item.is-error {
  opacity: 1;
}

.experiment-progress-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  border: 1px solid #555555;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.experiment-progress-item.is-done .experiment-progress-marker {
  border-color: #e3ff74;
  color: #e3ff74;
}

.experiment-progress-item.is-error .experiment-progress-marker {
  border-color: #ff3b2f;
  color: #ff3b2f;
}

.experiment-progress-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.experiment-progress-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.experiment-progress-detail {
  max-width: 460px;
  color: #a8a8a8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
}

.hidden {
  display: none;
}

.dot {
  opacity: 0.2;
  animation: fadeDot 1.2s infinite;
}

.dot-2 {
  animation-delay: 0.2s;
}

.dot-3 {
  animation-delay: 0.4s;
}

@keyframes fadeDot {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 1000px) {
  .app {
    padding: 12px;
    flex-direction: column;
    height: auto;
    gap: 12px;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    height: auto;
  }

  .canvas {
    margin-left: 0;
    min-height: 640px;
  }

  .image-preview-frame {
    width: 100%;
    max-height: none;
  }

  .banner-set-grid {
    width: 100%;
    flex-wrap: wrap;
  }

  .badge-fields-row {
    grid-template-columns: 1fr;
  }

  .video-ugc-canvas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 640px) {
  .banner-counter-section {
    position: static;
    width: max-content;
    max-width: calc(100% - 24px);
    margin: 0 12px 12px auto;
  }

  .video-ugc-canvas {
    padding: 18px 12px 28px;
  }

  .video-ugc-canvas-header {
    align-items: stretch;
    flex-direction: column;
  }

  .video-ugc-canvas-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.yandex-pro-reference-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.yandex-pro-reference-helper {
  margin: 2px 0 8px;
  color: rgba(14, 14, 14, 0.55);
  font-size: 11px;
  line-height: 1.35;
}

.yandex-pro-ingredient-buttons {
  gap: 6px;
}


.yango-pro-reference-pool-label {
  margin-top: 12px;
}

.yango-pro-reference-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.yango-pro-reference-preview.is-dense {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.yango-pro-reference-preview.is-dense .yango-pro-reference-caption {
  padding: 4px;
  font-size: 8px;
}

.yango-pro-reference-card {
  min-width: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(14, 14, 14, 0.35);
  border-radius: 7px;
  background: #f3f0e8;
  color: #0e0e0e;
  cursor: pointer;
  text-align: left;
}

.yango-pro-reference-card.is-active {
  border-color: #0e0e0e;
  box-shadow: 0 0 0 3px #0e0e0e;
}

.yango-pro-reference-card.is-active .yango-pro-reference-caption {
  background: #0e0e0e;
  color: #ff2b12;
}

.yango-pro-reference-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.yango-pro-reference-caption {
  display: block;
  padding: 5px 6px;
  overflow: hidden;
  color: #0e0e0e;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Figma UGC video flow — Performance_Master 341:6612–341:7292 */
.hidden {
  display: none !important;
}

.canvas {
  margin-left: 20px;
  border: 0;
  outline: 1px solid var(--soft-line);
}

.sidebar {
  border: 0;
}

.brand-block {
  height: 79px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title-yango {
  font-size: 75.9px;
}

.brand-title-product {
  font-size: 35.84px;
  line-height: 0.8;
}

.tab-row,
.tab-btn {
  height: 41px;
}

.video-ugc-visually-hidden-status,
.video-ugc-merged-section {
  display: none !important;
}

@keyframes ugc-animated-ellipsis {
  0%, 24% { content: ""; }
  25%, 49% { content: "."; }
  50%, 74% { content: ".."; }
  75%, 100% { content: "..."; }
}

.has-animated-ellipsis::after {
  display: inline-block;
  width: 1.5em;
  content: "";
  text-align: left;
  animation: ugc-animated-ellipsis 1.2s steps(1, end) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .has-animated-ellipsis::after {
    content: "...";
    animation: none;
  }
}

#videoTabPanel.is-ugc-mode .tab-panel-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(14, 14, 14, 0.45) transparent;
}

#videoTabPanel.is-ugc-mode .tab-panel-scroll::-webkit-scrollbar {
  width: 6px;
  height: 0;
}

#videoTabPanel.is-ugc-mode .tab-panel-scroll::-webkit-scrollbar-thumb {
  background: rgba(14, 14, 14, 0.45);
}

#videoTabPanel .tab-panel-scroll > :where(.section:not(.source-section)) {
  display: flex;
  flex-direction: column;
  gap: var(--ui-field-gap);
}
#videoTabPanel .tab-panel-scroll .field-label { margin: 0; }

#videoTabPanel.is-ugc-mode .tab-panel-scroll > .section:first-child {
  padding: var(--ui-padding);
  display: flex;
  flex-direction: column;
  gap: var(--ui-field-gap);
}

#videoTabPanel.is-ugc-mode .video-ugc-casting-section {
  padding: var(--ui-padding);
  gap: 12px;
}

.video-ugc-role-gender-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  gap: 8px;
}

.video-ugc-gender-field {
  align-items: flex-end;
}

.video-ugc-gender-field .angle-row {
  justify-content: flex-end;
}

#videoTabPanel.is-ugc-mode .video-title-slot,
#videoTabPanel.is-ugc-mode .field-label {
  margin: 0;
  color: #0e0e0e;
  font-size: var(--ui-label);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#videoTabPanel.is-ugc-mode .video-ugc-field {
  justify-content: flex-start;
  gap: var(--ui-field-gap);
}

/* Food form: labels stay with their controls; separate choices share one rhythm. */
#videoTabPanel #videoFoodSection,
#videoTabPanel #foodCourierFields {
  display: flex;
  flex-direction: column;
  gap: var(--ui-group-gap);
}

#videoTabPanel.is-ugc-mode .video-ugc-inline-fields {
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 12px;
}

#videoTabPanel.is-ugc-mode .video-ugc-inline-fields .text-input {
  min-height: 24px;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

#videoTabPanel.is-ugc-mode #videoUgcCountrySelect {
  appearance: none;
  background: transparent url("./assets/icons/ChevronDownM.svg") right center / 16px 16px no-repeat;
  padding-right: 20px;
  cursor: pointer;
}

#videoTabPanel.is-ugc-mode .video-ugc-age-field .text-input {
  text-align: right;
  appearance: textfield;
  -moz-appearance: textfield;
}

#videoTabPanel.is-ugc-mode .video-ugc-age-field .text-input::-webkit-inner-spin-button,
#videoTabPanel.is-ugc-mode .video-ugc-age-field .text-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

#videoTabPanel.is-ugc-mode .video-ugc-age-field {
  align-items: flex-end;
}

#videoTabPanel.is-ugc-mode .video-ugc-age-field .video-title-slot {
  width: 100%;
  text-align: right;
}

.video-ugc-hero-field {
  min-height: 35px;
  height: auto;
}

#videoTabPanel.is-ugc-mode .video-ugc-hero-field .text-input {
  width: 100%;
  min-height: 19px;
  height: auto;
  overflow: hidden;
  padding: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  resize: none;
}

.video-ugc-portrait-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.video-ugc-primary-action,
.video-ugc-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ui-control);
  border: 1px solid #0e0e0e;
  border-radius: var(--ui-radius);
  padding: 8px 10px;
  font: 700 var(--ui-label)/1.2 var(--ui-font);
  text-transform: uppercase;
  cursor: pointer;
}

.video-ugc-primary-action {
  background: #0e0e0e;
  color: #fd2501;
}

.video-ugc-secondary-action {
  background: transparent;
  color: #0e0e0e;
}

#videoTabPanel .video-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ui-space);
}
#videoTabPanel .video-section-heading > :is(div, label, p) { flex: 1; min-width: 0; }
#videoTabPanel .video-section-heading .field-label { margin: 0; }
#videoTabPanel .video-section-heading .upload-icon-btn { flex: 0 0 var(--ui-control); }
/* One text column; the upload spans two rows without stretching the label row. */
#videoTabPanel .section.reference-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ui-control);
  column-gap: var(--ui-space);
  row-gap: var(--ui-field-gap);
  align-items: start;
}
#videoTabPanel .reference-field > *,
#videoTabPanel .reference-field .field-label,
#videoTabPanel .reference-field .video-helper-text { grid-column: 1; }
#videoTabPanel .reference-field :is(.video-section-heading, .source-library-header),
#videoTabPanel .reference-field :is(.video-section-heading, .source-library-header) > div {
  display: contents;
}
#videoTabPanel .reference-field .field-label { grid-row: 1; }
#videoTabPanel .reference-field .upload-icon-btn {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
}
#videoTabPanel .reference-field > :is(.ui-button, .mini-action-btn) { justify-self: start; }
#videoTabPanel .vehicle-field > select {
  height: var(--ui-control);
  min-width: 0;
  padding: 0 24px 0 0;
  appearance: none;
  background: transparent url("./assets/icons/ChevronDownM.svg") right center / 16px 16px no-repeat;
  line-height: 1.25;
  cursor: pointer;
}
.vehicle-branding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-chip-gap);
}
#videoTabPanel .video-helper-text {
  width: auto;
  margin: 0;
  color: var(--ui-placeholder);
  font-size: var(--ui-label);
  line-height: 1.4;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
#videoTabPanel .video-helper-text:empty { display: none; }
#videoTabPanel #videoUgcBrandingSection > .field-label { margin: 0; }

#videoTabPanel.is-ugc-mode #videoResultStatusSection,
#videoTabPanel.is-ugc-mode #videoLibrarySection,
#videoTabPanel.is-ugc-mode #videoTitlesSection {
  display: none !important;
}

#videoTabPanel .video-generation-access-section {
  flex: 0 0 auto;
  min-height: 94px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  grid-template-rows: minmax(35px, auto) 29px;
  column-gap: 12px;
  row-gap: 10px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 var(--line);
}

.video-duration-control,
.video-generation-password-control {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

#videoTabPanel .video-duration-label {
  margin: 0;
}

#videoTabPanel .video-duration-options {
  flex-wrap: wrap;
}

#videoTabPanel .video-duration-options .angle-chip {
  min-width: 29px;
  width: 29px;
  height: var(--ui-chip);
  padding: 2px 0 0;
}

#videoTabPanel #ugcOutputModeControl .angle-chip {
  width: 48px;
  min-width: 48px;
}

#videoTabPanel .video-duration-options .angle-chip:disabled {
  opacity: 1;
  border-color: #0e0e0e;
  background: transparent;
  color: #0e0e0e;
}

#videoTabPanel .video-generation-password-control {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  align-items: stretch;
}

#videoTabPanel .video-generation-password-control .field-label {
  width: 72px;
  margin: 0;
  align-self: center;
}

#videoTabPanel .video-generation-password-input {
  width: 180px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #0e0e0e;
  padding: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 22px;
  text-align: left;
  border-bottom: 1px solid rgba(14, 14, 14, 0.35);
}

#videoTabPanel .video-generation-password-input::placeholder {
  color: #0e0e0e;
  opacity: 1;
}

#videoTabPanel.is-ugc-mode .section-generate {
  flex: 0 0 68px;
  height: 68px;
  padding: 10px 0;
  border-top: 0;
}

#videoTabPanel.is-ugc-mode .section-generate .generate-btn {
  height: 48px;
}

.canvas.is-ugc-video {
  overflow: hidden;
}

.canvas.is-ugc-video > .canvas-top,
.canvas.is-ugc-video > .loader {
  display: none !important;
}

.canvas.is-ugc-video #videoCanvas {
  overflow: hidden;
}

.canvas.is-ugc-video .video-workspace,
.canvas.is-ugc-video .video-result-card {
  height: 100%;
  min-height: 0;
}

.canvas.is-ugc-video .video-result-card {
  border: 0;
  background: transparent;
  padding: 0;
  gap: 0;
}

.video-ugc-figma-header {
  flex: 0 0 auto;
  min-height: var(--canvas-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--canvas-gutter);
}

.video-ugc-figma-phase {
  margin: 0;
  color: #e5e5e5;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.video-ugc-copy-btn {
  width: 77px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(229, 229, 229, 0.3);
  background: transparent;
  color: #e5e5e5;
  padding: 0;
  font: 700 12px/1 "Yango Group Text", Arial, sans-serif;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.video-ugc-copy-btn img {
  width: 16px;
  height: 16px;
  filter: invert(1);
}

.canvas.is-ugc-video .video-result-label {
  display: none !important;
}

.canvas.is-ugc-video .video-empty-state {
  flex: 1 1 auto;
  min-height: 0;
  align-items: flex-start;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  padding: 0;
}

.canvas.is-ugc-video .video-ugc-canvas {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px var(--canvas-gutter) 24px;
  color: #e5e5e5;
}

.video-ugc-intro h2,
.video-ugc-canvas-title {
  margin: 0;
  color: #e5e5e5;
  font-family: "Yango Group Headline", Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: none;
  overflow-wrap: anywhere;
}

.video-ugc-intro p {
  margin: 16px 0 0;
  max-width: 440px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.video-ugc-intro button {
  border: 0;
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.video-ugc-current-portraits {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.video-ugc-canvas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.video-ugc-canvas-card {
  position: relative;
  aspect-ratio: 233 / 350;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 20px;
  background: rgba(229, 229, 229, 0.05);
  color: #e5e5e5;
  padding: 12px;
  transition: border-color 120ms ease;
}

.video-ugc-canvas-card:hover,
.video-ugc-canvas-card:focus-visible {
  border-color: rgba(229, 229, 229, 0.65);
  outline: none;
  transform: none;
}

.video-ugc-canvas-card.is-active {
  border-color: #fd2501;
  box-shadow: none;
}

.video-ugc-canvas-card-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.video-ugc-option-badge {
  display: none;
}

.video-ugc-selected-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  z-index: 2;
  min-height: 22px;
  border-radius: var(--ui-radius);
  background: #fd2501;
  color: #0e0e0e;
  padding: 0 8px;
  font-size: 8px;
  letter-spacing: -0.02em;
}

.video-ugc-canvas-card-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 12px;
  pointer-events: none;
}

.video-ugc-canvas-card-title {
  display: none;
}

.video-ugc-card-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  pointer-events: auto;
}

.video-ugc-card-action {
  min-height: 33px;
  border: 0;
  border-radius: var(--ui-radius);
  background: rgba(0, 0, 0, 0.3);
  color: #e5e5e5;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  backdrop-filter: blur(5px);
}

.video-ugc-card-download {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: auto;
  z-index: 3;
  width: 28px;
  min-height: 28px;
  border: 1px solid #fff;
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--ui-radius);
  padding: 5px;
}

.video-ugc-card-download img {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%) invert(100%);
}

.video-ugc-edit-panel {
  position: absolute;
  inset: auto 12px 54px;
  z-index: 4;
  border: 0;
  border-radius: var(--ui-radius);
  background: rgba(14, 14, 14, 0.94);
  padding: 10px;
}

.video-ugc-saved-section {
  margin: 40px 0 0;
  padding: 0;
  border: 0;
}

.video-ugc-intro + .video-ugc-saved-section {
  margin-top: 40px;
}

.video-ugc-gallery-country {
  display: block;
  height: 16px;
  margin: 0 0 24px;
  border: 0;
  background: transparent;
  color: #e5e5e5;
  padding: 0;
  font: 800 16px/1 "Yango Group Text", Arial, sans-serif;
  cursor: pointer;
}

.video-ugc-saved-grid .video-ugc-card-actions,
.video-ugc-saved-grid .video-ugc-card-download,
.video-ugc-saved-grid .video-ugc-selected-badge,
.video-ugc-saved-grid .video-ugc-option-badge {
  display: none;
}

.video-ugc-saved-grid {
  gap: 10px;
}

.video-ugc-saved-grid .video-ugc-canvas-card {
  aspect-ratio: 4 / 5;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.video-ugc-saved-grid .video-ugc-canvas-card-image {
  border-radius: 0;
}

.canvas.is-ugc-video .video-result-wrap {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: block;
  padding: 12px var(--canvas-gutter) 0;
}

.canvas.is-ugc-video .video-result-player {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 20px;
  background: rgba(229, 229, 229, 0.05);
  object-fit: cover;
}

.canvas.is-ugc-video .video-download-link {
  position: static;
  width: 58px;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: var(--ui-radius);
  background: rgba(0, 0, 0, 0.08) url("./assets/icons/Download.svg") 8px center / 14px 14px no-repeat;
  padding: 0 7px 0 27px;
  color: transparent;
  font-size: 0;
}

.canvas.is-ugc-video .video-download-links {
  position: absolute;
  top: 24px;
  left: 44px;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.canvas.is-ugc-video .video-download-link::after {
  content: attr(data-ugc-label);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 1000px) {
  .canvas {
    margin-left: 0;
  }

  #videoTabPanel.is-ugc-mode .tab-panel-scroll {
    overflow-y: auto;
  }

  .video-ugc-intro h2,
  .video-ugc-canvas-title {
    font-size: 32px;
    white-space: normal;
  }

  .video-ugc-canvas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .video-ugc-canvas-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .canvas.is-ugc-video .video-result-player {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* Durable generation tasks remain reachable after a page reload. */
.operation-panel {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 1000;
  color: var(--text-light);
  font: inherit;
}

.banner-counter-section .operation-panel {
  position: static;
  margin-left: 7px;
  border-left: 1px solid rgba(229, 229, 229, 0.14);
  color: rgba(229, 229, 229, 0.7);
}

.operation-panel summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0 4px 9px;
  min-height: 24px;
  list-style: none;
  font-size: var(--ui-label);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.operation-panel summary::-webkit-details-marker {
  display: none;
}

.operation-panel summary::after {
  content: "";
  width: 5px;
  height: 5px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: translateY(2px) rotate(45deg);
}

.operation-panel[open] summary::after {
  transform: translateY(-1px) rotate(225deg);
}

.operation-panel summary:hover,
.operation-panel[open] summary {
  color: var(--text-light);
}

.operation-panel summary:focus-visible,
.operation-row a:focus-visible,
.operation-row button:focus-visible {
  outline: 1px solid var(--text-light);
  outline-offset: 4px;
}

.operation-panel.has-active-tasks summary {
  color: var(--panel);
}

.operation-panel > div {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(360px, calc(100vw - 28px));
  max-height: 55vh;
  overflow-y: auto;
  padding: 14px 16px;
  border: 1px solid var(--soft-line);
  border-radius: var(--ui-radius);
  background: var(--bg);
  color: var(--text-light);
  box-shadow: var(--ui-shadow);
  font-size: 12px;
  line-height: 1.5;
}

.operation-row {
  padding: 12px 0;
  border-top: 1px solid var(--soft-line);
  overflow-wrap: anywhere;
}

.operation-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.operation-row:last-child {
  padding-bottom: 0;
}

.operation-row p {
  margin: 6px 0;
  color: rgba(229, 229, 229, 0.65);
}

.operation-row a {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text-light);
  text-underline-offset: 3px;
}

.operation-row button {
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--ui-radius-small);
  background: transparent;
  color: var(--text-light);
  font: inherit;
  cursor: pointer;
}

.operation-row button:hover:not(:disabled) {
  border-color: var(--text-light);
}

.operation-row button:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (max-width: 640px) {
  .banner-counter-section {
    position: relative;
    right: auto;
    bottom: auto;
  }
}

.glitch-tools {
  width: 100%;
  max-width: 900px;
  margin: 8px auto 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.glitch-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.glitch-choice-btn {
  border: 1px solid #555;
  border-radius: var(--ui-radius-small);
  padding: 7px 10px;
  background: transparent;
  color: #bcbcbc;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.glitch-choice-btn[aria-pressed="true"] {
  border-color: var(--panel);
  background: color-mix(in srgb, var(--panel) 14%, transparent);
  color: #fff;
}

.glitch-choice-btn:hover:not(:disabled) { border-color: #bcbcbc; }
.glitch-choice-btn:focus-visible { outline: 2px solid #bcbcbc; outline-offset: 2px; }
.glitch-choice-btn:disabled { opacity: 0.45; cursor: default; }

.car-logo-control {
  display: flex;
  align-items: center;
  gap: var(--ui-space);
  min-height: var(--ui-control);
  font-size: var(--ui-label);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

/* Native semantics, brand appearance in both checked and unchecked states. */
:where(.sidebar, .ui-surface) input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: var(--ui-border) solid var(--ui-fg);
  border-radius: 2px;
  background: transparent;
  color: var(--ui-inverse);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
}
:where(.sidebar, .ui-surface) input[type="checkbox"]:checked {
  background: var(--ui-fg);
}
:where(.sidebar, .ui-surface) input[type="checkbox"]::before {
  content: "";
  width: 7px;
  height: 4px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg) scale(0);
}
:where(.sidebar, .ui-surface) input[type="checkbox"]:checked::before {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}
:where(.sidebar, .ui-surface) input[type="checkbox"]:disabled {
  opacity: var(--ui-disabled);
  cursor: not-allowed;
}
@media (forced-colors: active) {
  :where(.sidebar, .ui-surface) input[type="checkbox"] { appearance: auto; }
  :where(.sidebar, .ui-surface) input[type="checkbox"]::before { display: none; }
}


.story-without-portrait { margin: 0 0 24px; }

/* Click-to-validate hint: floats beside the field without changing the form layout. */
.generation-popover {
  position: fixed;
  z-index: 1100;
  box-sizing: border-box;
  width: 256px;
  padding: 13px 36px 13px 14px;
  border: 1px solid #555;
  border-radius: var(--ui-radius);
  background: var(--bg);
  color: var(--text-light);
  font-family: "Yango Group Text", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: var(--ui-shadow);
}
.generation-popover p { margin: 0; }
.generation-popover::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--bg);
  border: solid #555;
  border-width: 0 0 1px 1px;
}
.generation-popover[data-side="right"]::before {
  left: -5px; top: var(--pointer-y); transform: translateY(-50%) rotate(45deg);
}
.generation-popover[data-side="below"]::before {
  top: -5px; left: var(--pointer-x); transform: translateX(-50%) rotate(135deg);
}
.generation-popover[data-side="above"]::before {
  bottom: -5px; left: var(--pointer-x); transform: translateX(-50%) rotate(-45deg);
}
.generation-popover-close {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--panel);
  font: 22px/1 "Yango Group Text", Arial, sans-serif;
  cursor: pointer;
}
.generation-popover-close:hover { color: var(--text-light); }
.generation-popover-close:focus-visible { outline: 1px solid var(--panel); outline-offset: -2px; }

/* Shared control families. Add new actions here or use ui-button / ui-icon-button.
   The component contract and exceptions live in docs/ui-style-guide.md. */
.food-color-controls { display: flex; align-items: flex-start; flex-wrap: wrap; gap: var(--ui-space); }
.food-color-swatches { display: grid; grid-template-columns: repeat(6, 36px); gap: var(--ui-chip-gap); }
.food-color-controls .accent-swatch-btn { width: 36px; height: 36px; padding: 2px; flex: none; }
.food-color-controls .accent-swatch-core { width: 30px; height: 30px; }
.food-color-custom .accent-swatch-core { background: conic-gradient(#e9c46a, #b9c8a8, #a8c4ce, #c9b8d7, #d88b77, #e9c46a); }
.food-color-controls .accent-swatch-btn:hover:not(:disabled) { border-color: var(--text-dark); }
.food-color-controls .accent-swatch-btn:focus-visible { outline: 2px solid var(--text-dark); outline-offset: 2px; }
.food-color-controls .accent-swatch-btn:disabled { opacity: var(--ui-disabled); cursor: not-allowed; }
.food-detail-slider:focus-visible { outline: 2px solid var(--text-dark); outline-offset: 2px; }
.food-light-slider:focus-visible { outline: 2px solid var(--text-dark); outline-offset: 2px; }
.food-batch-notice {
  margin: 0 0 var(--ui-space);
  color: var(--text-light);
  font: 700 var(--ui-body)/1.4 var(--ui-font);
}
.ui-button,
.source-library-load-more,
.rida-helper-btn,
.mini-action-btn,
.quick-action-btn,
.canvas-action-btn,
.result-image-retry,
.operation-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space);
  min-height: var(--ui-control);
  padding: 8px 12px;
  border: var(--ui-border) solid currentColor;
  border-radius: var(--ui-radius);
  background: transparent;
  color: var(--ui-fg);
  font-family: var(--ui-font);
  font-size: var(--ui-label);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ui-duration) ease, color var(--ui-duration) ease,
    border-color var(--ui-duration) ease;
}
.source-library-load-more { width: 100%; }
.ui-button:hover:not(:disabled),
.source-library-load-more:hover:not(:disabled),
.rida-helper-btn:hover:not(:disabled),
.mini-action-btn:hover:not(:disabled),
.quick-action-btn:hover:not(:disabled),
.canvas-action-btn:hover:not(:disabled),
.result-image-retry:hover:not(:disabled),
.operation-row button:hover:not(:disabled) {
  border-color: var(--ui-fg);
  background: var(--ui-fg);
  color: var(--ui-inverse);
}
.ui-button--primary,
.mini-action-btn:not(.mini-action-btn-secondary) {
  background: var(--ui-fg);
  border-color: var(--ui-fg);
  color: var(--ui-inverse);
}
.ui-button--primary:hover:not(:disabled),
.mini-action-btn:not(.mini-action-btn-secondary):hover:not(:disabled) {
  background: transparent;
  color: var(--ui-fg);
}
.ui-icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--ui-control);
  height: var(--ui-control);
  padding: 0;
  border: var(--ui-border) solid currentColor;
  border-radius: var(--ui-radius);
  background: transparent;
  color: var(--ui-fg);
}
.ui-icon-button svg { width: 16px; height: 16px; }
.source-card-delete:hover:not(:disabled),
.selected-source-remove:hover:not(:disabled),
.clear-source-btn:hover:not(:disabled) {
  background: var(--text-dark);
  color: var(--panel);
}
/* Compact visual cross; larger invisible hit area without covering the thumbnail. */
.source-card-delete::after,
.selected-source-remove::after,
.clear-source-btn::after {
  content: "";
  position: absolute;
  inset: -4px;
}
.clear-source-btn { position: relative; color: var(--text-dark); }
.tab-btn, .generate-btn { border-radius: 0; }
.field-label { font-size: var(--ui-label); }
:is(.ui-button, .source-library-load-more, .rida-helper-btn, .mini-action-btn,
    .quick-action-btn, .canvas-action-btn, .generate-btn, .result-image-retry):disabled {
  opacity: var(--ui-disabled);
  cursor: not-allowed;
}
/* Focus is visible on both red and dark surfaces, including formerly outline:none fields. */
:is(button, input, textarea, select, summary, a):focus-visible {
  outline: 2px solid var(--ui-fg);
  outline-offset: 2px;
}
:is(.text-input, .text-area, .prompt-input, .video-story-input):focus-visible {
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  :root { --ui-duration: 0ms; }
}

.canvas.is-ugc-video .video-empty-state { overflow-y: auto; }

/* Video text fields share the borderless, growing location control. */
#videoTabPanel.is-ugc-mode textarea.video-text-field,
#videoTabPanel textarea.video-text-field {
  width: 100%; min-height: 1.4em; height: auto; padding: 0; border: 0;
  border-radius: 0; background: transparent; box-shadow: none;
  font-family: var(--ui-font); font-size: var(--ui-value); line-height: 1.35;
  color: var(--text-dark); resize: none; overflow: hidden;
}
#videoTabPanel textarea.video-text-field:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#videoTabPanel.is-ugc-mode #videoUgcLocationInput {
  max-height: 180px;
  overflow-y: auto;
}
#videoTabPanel #videoPromptInput { font-size: var(--ui-body); }
#videoTabPanel #videoPackshotLine { text-transform: none; }
#videoTabPanel .story-language-select { width: auto; max-width: 48%; font-size: var(--ui-body); }
#storyScenarioReview { text-align: left; }
#storyScenarioReview p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
#storyScenarioReview h3 { margin-top: 24px; }

.story-revision-editor { margin-top: 24px; border-top: var(--ui-border) solid var(--soft-line); padding-top: 24px; }
.story-revision-input {
  display: block; width: 100%; min-height: 48px; margin: 12px 0; padding: 0;
  border: 0; background: transparent; color: var(--text-light);
  font: 400 var(--ui-value)/1.4 var(--ui-font); resize: none; overflow: hidden;
}
.story-revision-input:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

#portraitPromptDetails summary { cursor: pointer; font-size: var(--ui-body); }
#portraitPromptDetails summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#portraitPromptList { font-size: var(--ui-body); line-height: 1.5; }
.portrait-prompt-text { white-space: pre-wrap; overflow-wrap: anywhere; }


.video-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space);
  margin: var(--ui-padding) 0;
}
.video-result-actions .ui-button {
  flex: 1 1 200px;
  min-height: var(--ui-primary);
}
.video-result-actions .video-result-packshot {
  background: var(--panel);
  border-color: var(--panel);
  color: var(--bg);
}
.video-result-actions .video-result-revise {
  background: var(--bg);
  border-color: var(--text-light);
  color: var(--text-light);
}
.video-result-actions .ui-button:hover:not(:disabled) {
  background: var(--text-light);
  border-color: var(--text-light);
  color: var(--bg);
}

.video-timeline { margin-top: 20px; padding: 20px 0; color: var(--text-light); border-top: 1px solid var(--text-light); }
.video-timeline[hidden] { display: none; }
.video-timeline-heading, .video-timeline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.video-timeline-heading { justify-content: space-between; }
.video-timeline h3 { margin: 0; font-size: 20px; }
.video-timeline p { margin: 12px 0; font-size: 14px; line-height: 1.5; }
.video-timeline-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.video-timeline .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.video-timeline-selection-label { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; }
.video-timeline-range { position: relative; height: 44px; margin: 12px 44px 24px; touch-action: none; }
.video-timeline-bar { position: absolute; inset: 6px 0; background: #454545; border-radius: var(--ui-radius); overflow: hidden; }
.video-timeline-bar span { position: absolute; top: 0; bottom: 0; background: var(--panel); }
.video-timeline-selection { position: absolute; top: 4px; bottom: 4px; border: 2px solid var(--text-light); box-sizing: border-box; background: rgb(255 255 255 / 15%); pointer-events: none; }
.video-timeline-handle { position: absolute; top: 0; width: 44px; height: 44px; transform: translateX(-50%); border: 0; background: transparent; padding: 0; cursor: ew-resize; touch-action: none; z-index: 1; }
.video-timeline-handle::after { content: ""; position: absolute; inset: 0 15px; border-radius: 4px; background: var(--text-light); border: 2px solid var(--bg); box-sizing: border-box; }
.video-timeline-handle[data-edge="in"] { transform: translateX(-100%); }
.video-timeline-handle[data-edge="out"] { transform: none; }
.video-timeline-handle[data-edge="in"]::after { inset: 0 0 0 28px; }
.video-timeline-handle[data-edge="out"]::after { inset: 0 28px 0 0; }
.video-timeline-handle:focus-visible { z-index: 2; }
.video-timeline .ui-button { background: var(--bg); color: var(--text-light); border: 1px solid var(--text-light); }
.video-timeline .video-timeline-primary { background: var(--panel); border-color: var(--panel); color: var(--bg); }
.video-timeline .ui-button:hover:not(:disabled) { background: var(--text-light); color: var(--bg); }
.video-timeline input:focus-visible, .video-timeline button:focus-visible { outline: 2px solid var(--text-light); outline-offset: 2px; }
.video-timeline fieldset:disabled { opacity: var(--ui-disabled); }
.video-timeline-cuts { list-style: none; padding: 0; margin: 16px 0 0; }
.video-timeline-cuts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.video-timeline [data-error]:empty { display: none; }
.video-timeline [data-error] { font-weight: bold; }
@media (max-width: 700px) {
  .video-timeline-actions > button { flex: 1 1 160px; }
}

/* Timeline fields reuse the VIDEO field family on the dark canvas. */
.video-timeline textarea.video-text-field {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--ui-control);
  margin-block: var(--ui-space);
  padding: var(--ui-padding);
  border: 1px solid currentColor;
  border-radius: var(--ui-radius);
  background: transparent;
  color: inherit;
  font: var(--ui-body)/1.4 var(--ui-font);
  resize: vertical;
}
.video-timeline textarea.video-text-field:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.video-timeline details { margin-block: var(--ui-padding); }
.video-timeline input[type="file"] { max-width: 100%; }

#videoTitlesSection .video-packshot-mode-control + .video-helper-text {
  margin-top: var(--ui-padding);
}

.video-timeline [data-repair-status] {
  padding: var(--ui-padding);
  margin-block: var(--ui-space);
  border: 1px solid currentColor;
  border-radius: var(--ui-radius);
}
.video-timeline [data-repair-message] { margin: 0; }
.video-timeline [data-repair-progress] {
  display: block;
  width: 100%;
  height: var(--ui-space);
  margin-top: var(--ui-space);
  accent-color: var(--panel);
}
.video-timeline [data-repair-progress][hidden] { display: none; }

.video-timeline-range [data-scene-markers] {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.video-timeline-range [data-scene-markers] span {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 2px;
  background: var(--text-light);
}
.video-timeline-controls [data-scene-controls][hidden],
[data-action="trim-repair"][hidden] { display: none; }

.video-timeline-controls [data-scene-controls] { margin-top: var(--ui-padding); }

[data-insert-track][hidden] { display: none; }
[data-insert-rail] { background: transparent; }
[data-insert-band] {
  background: color-mix(in srgb, var(--text-light) 45%, transparent);
}


/* Two aligned tracks share one playhead. */
.video-timeline [data-timeline-stack] { position: relative; margin: 12px 22px; touch-action: none; }
.video-timeline [data-timeline-stack] .video-timeline-range { margin: 0; height: 32px; }
.video-timeline [data-insert-track] { margin-bottom: 6px; }
.video-timeline [data-timeline-stack] .video-timeline-handle { height: 32px; width: 24px; }
.video-timeline [data-timeline-stack] .video-timeline-handle::after { inset: 2px 8px; border-width: 1px; }
.video-timeline [data-timeline-stack] .video-timeline-handle[data-edge="in"]::after { inset: 2px 0 2px 16px; }
.video-timeline [data-timeline-stack] .video-timeline-handle[data-edge="out"]::after { inset: 2px 16px 2px 0; }
.video-timeline [data-insert-content] {
  position: absolute; top: 4px; bottom: 4px;
  background: repeating-linear-gradient(135deg, transparent 0 4px, rgb(229 229 229 / 24%) 4px 6px);
  border: 1px solid rgb(229 229 229 / 30%); box-sizing: border-box;
}
.video-timeline [data-insert-band] { background: color-mix(in srgb, var(--text-light) 45%, var(--bg)); pointer-events: auto; cursor: pointer; }
.video-timeline [data-insert-band]:focus-visible { outline: 2px solid var(--text-light); outline-offset: 2px; }
.video-timeline [data-playhead-rail] { position: absolute; inset: -5px 0; pointer-events: none; }
.video-timeline [data-playhead] {
  position: absolute; top: 0; bottom: 0; width: 14px; padding: 0;
  transform: translateX(-50%); border: 0; background: transparent;
  pointer-events: auto; cursor: ew-resize; z-index: 3; touch-action: none;
}
.video-timeline [data-playhead]::before { content: ""; position: absolute; left: 6px; width: 2px; top: 0; bottom: 0; background: var(--text-light); box-shadow: 0 0 0 1px var(--bg); }
.video-timeline [data-playhead]::after { content: ""; position: absolute; left: 2px; top: 0; width: 10px; height: 6px; background: var(--text-light); }
.video-timeline [data-action="remove-insert"][hidden],
.video-timeline [data-action="detect"][hidden],
.video-timeline [data-repair-status][hidden] { display: none; }
.video-timeline [data-repair-status] { border: 0; padding: 0; }
.video-timeline .video-timeline-selection-label { font-size: var(--ui-body); margin-top: var(--ui-space); }

/* Password keeps the same geometry and colors with browser autofill. */
#videoTabPanel .video-generation-password-control {
  align-items: center;
  min-width: 0;
}
#videoTabPanel .video-generation-password-control .field-label { flex: 0 0 72px; }
#videoTabPanel .video-generation-password-input {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 180px;
  height: var(--ui-control);
  border-radius: 0;
  font-family: var(--ui-font);
  font-weight: 400;
  color: var(--text-dark);
  caret-color: var(--text-dark);
  background: var(--panel);
}
#videoTabPanel .video-generation-password-input:autofill {
  box-shadow: 0 0 0 1000px var(--panel) inset;
  -webkit-text-fill-color: var(--text-dark);
}
#videoTabPanel .video-generation-password-input:-webkit-autofill,
#videoTabPanel .video-generation-password-input:-webkit-autofill:hover,
#videoTabPanel .video-generation-password-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--panel) inset;
  -webkit-text-fill-color: var(--text-dark);
  caret-color: var(--text-dark);
}

/* Video pacing shares the existing range control geometry. */
#videoTabPanel .video-generation-access-section { grid-template-rows: auto; }

#videoManualSubtitlesEditor [data-manual][hidden] { display: none; }
#videoManualSubtitlesEditor [data-manual] { margin-top: var(--ui-padding); }
#videoManualSubtitlesEditor [data-cues] > div { margin-top: var(--ui-padding); }
#videoManualSubtitlesEditor textarea { width: 100%; box-sizing: border-box; min-height: 64px; }
#videoManualSubtitlesEditor [role="alert"]:empty { display: none; }

#videoSubtitlesSection > .badge-toggle-row { margin-top: var(--ui-padding); }

/* Edit has one vertical scroll owner. */
.canvas.is-edit-video { min-width: 0; overflow: auto; }
.canvas.is-edit-video #videoCanvas { flex: 0 0 auto; overflow: visible; min-width: 0; }
.canvas.is-edit-video .video-workspace,
.canvas.is-edit-video .video-result-card,
.canvas.is-edit-video .video-result-wrap { min-width: 0; min-height: 0; }
.canvas.is-edit-video .video-result-player { max-height: 42vh; flex-shrink: 0; }
.canvas.is-edit-video .canvas-top { flex-shrink: 0; }
@media (max-width: 1000px) {
  .canvas.is-edit-video { overflow: visible; }
}
@media (max-width: 700px) {
  .video-timeline-heading .video-timeline-actions { gap: var(--ui-space); }
  .video-timeline-heading .video-timeline-actions > button { flex: 0 1 auto; }
}

/* Video ancestry uses one row; version controls share the standard button family. */
.source-card-wrap.video-library-group {
  width: 100%;
  height: auto;
  min-height: 40px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: var(--ui-space);
}
.video-library-group > .source-card-delete { right: auto; left: 28px; }
.video-library-versions { min-width: 0; }
.video-library-versions > .ui-button {
  width: 100%;
  white-space: normal;
  text-align: left;
}
.video-library-versions > button { margin-top: var(--ui-space); }
.video-library-versions > button[aria-pressed="true"] {
  background: var(--text-dark);
  color: var(--panel);
}

/* Account screens reuse the shared dark surface and control families. */
body.account-page { height: auto; min-height: 100vh; overflow: auto; color: var(--text-light); background: var(--bg); }
.account-shell { max-width: 1440px; margin: 0 auto; padding: 32px; font-family: var(--ui-font, "Yango Group Text"), sans-serif; }
.account-shell [hidden] { display: none !important; }
.account-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.account-heading h1 { font-size: 28px; margin: 0; }
.account-heading h1 span { font-weight: 400; font-size: 18px; }
.account-heading nav { display: flex; gap: 8px; }
.account-auth { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; max-width: 900px; margin: 32px auto; }
.account-form { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid currentColor; padding-top: 16px; }
.account-shell label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.account-shell input, .account-shell select { width: 100%; box-sizing: border-box; border: 1px solid currentColor; border-radius: var(--ui-radius,8px); background: var(--bg); color: var(--text-light); padding: 10px 12px; font: inherit; min-height: 40px; }
.account-shell input:focus-visible, .account-shell select:focus-visible, .account-shell a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.account-shell a { color: inherit; }
.account-shell a:hover { text-decoration: underline; }
.account-shell p { font-size: 13px; line-height: 1.5; }
.account-shell section { margin: 24px 0; }
.account-shell h2 { font-size: 22px; }
.account-shell h3 { font-size: 16px; }
.account-table-scroll { overflow-x: auto; margin: 16px 0; }
.account-shell table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.account-shell th,.account-shell td { border-bottom: 1px solid var(--soft-line); padding: 12px 8px; vertical-align: top; }
.account-shell td input { min-width: 120px; }
.account-shell td button { margin: 6px 4px 0 0; }
.account-history article { border-top: 1px solid var(--soft-line); padding: 16px 0; }
.account-previews { display: flex; flex-wrap: wrap; gap: 16px; }
.account-previews a { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.account-previews img { height: 160px; max-width: 220px; object-fit: contain; border-radius: var(--ui-radius,8px); }
.account-shell pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.account-shell summary { cursor: pointer; margin: 16px 0; }
.account-entry { margin: 8px 12px; text-align: center; }
@media (max-width: 700px) { .account-shell { padding: 20px 12px; } .account-auth { grid-template-columns: 1fr; } }
.account-shell input[type="checkbox"] { width: 14px; min-width: 14px; min-height: 14px; height: 14px; accent-color: var(--text-light); }
.account-shell td label { flex-direction: row; align-items: center; margin-bottom: 8px; }

.tab-btn[hidden] { display: none; }

/* Account controls keep the shared checkbox geometry and a visible check mark. */
.account-shell.ui-surface { --ui-fg: var(--text-light); --ui-inverse: var(--bg); }
.account-shell input[type="checkbox"] {
  padding: 0; margin: 0; width: 18px; height: 18px; min-width: 18px; min-height: 18px;
  border-radius: 3px; border: 1px solid var(--text-light); background: transparent;
  color: var(--bg); display: inline-grid; place-content: center;
}
.account-shell input[type="checkbox"]:checked { background: var(--text-light); color: var(--bg); }
.account-shell input[type="checkbox"]::before { width: 8px; height: 5px; }
.account-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; min-height: 56px; flex-shrink: 0; }
.account-login-link { color: var(--text-light); font-size: 12px; text-decoration: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-login-link:hover { text-decoration: underline; }
.account-login-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.account-login { font-size: 12px; align-self: center; overflow-wrap: anywhere; }
.account-home { position: absolute; inset: 56px 0 0; z-index: 10; background: var(--bg); color: var(--text-light); padding: 24px; overflow-y: auto; }
.account-home[hidden] { display: none; }
.canvas.has-account-home > :not(.account-toolbar):not(.account-home) { visibility: hidden; pointer-events: none; }
.account-home-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.account-home-heading h2 { margin: 0; font-size: 24px; font-weight: 500; }
.account-home-filters { display: flex; gap: 8px; margin-top: 24px; }
.account-home-filters [aria-pressed="true"] { background: var(--text-light); color: var(--bg); }
.account-home-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 24px 16px; margin: 24px 0; }
.account-home-grid img,.account-home-grid video { display: block; width: 100%; height: 240px; object-fit: contain; background: #181818; border-radius: var(--ui-radius); }
.account-home-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; font-size: 12px; }
.account-home-caption strong { display: block; font-weight: 500; overflow-wrap: anywhere; }
.account-home-caption span { display: block; margin-top: 4px; opacity: .65; }
.account-home-caption a { color: inherit; text-decoration: none; }
@media(max-width:700px) { .account-home { padding: 16px; } .account-home-grid { grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); } .account-toolbar { padding: 12px 8px; gap: 8px; } }
@media(forced-colors:active) { .account-shell input[type="checkbox"] { appearance: auto; } }

/* A single centered authentication form; registration is a separate state. */
.account-signed-out .account-shell { min-height: 100dvh; display: flex; flex-direction: column; box-sizing: border-box; }
.account-signed-out .account-auth { display: block; width: min(100%,380px); margin: auto; padding: 32px 0 80px; }
.account-signed-out .account-form { border: 0; padding: 0; gap: 20px; }
.account-signed-out .account-form h2 { margin: 0; font-size: 32px; font-weight: 500; }
.account-signed-out .account-form p { margin: 0 0 8px; opacity: .7; }
.account-signed-out .account-form input { height: 48px; }
.account-signed-out .account-form > .ui-button--primary { min-height: 48px; }
.account-auth-switch { border: 0; background: transparent; color: var(--text-light); font: inherit; font-size: 12px; cursor: pointer; padding: 8px; }
.account-auth-switch:hover { text-decoration: underline; }
.account-auth-switch:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width:1000px) {
  .app:has(.has-account-home) > .canvas { order: -1; margin-left: 0; min-height: 75dvh; }
}

/* Personal workspace — Figma Page 6: square gallery tabs and image tiles. */
.canvas:has(.account-toolbar) { margin-left: 0; }
.account-toolbar { padding: 12px 14px 12px 24px; position: relative; z-index: 12; }
.account-home-link { border: 0; padding: 0; color: var(--text-light); background: transparent; font: 700 12px var(--ui-font); text-transform: uppercase; cursor: pointer; }
.account-home-link:hover { opacity: .7; }
.account-home-link:focus-visible, .account-avatar:focus-visible, .account-creative-preview:focus-visible { outline: 2px solid var(--text-light); outline-offset: 4px; }
.account-profile { position: relative; margin-left: auto; color: var(--text-light); }
.account-avatar { display: grid; place-items: center; list-style: none; width: 32px; height: 32px; border-radius: 50%; background: #333; outline: 1px solid var(--text-light); outline-offset: 2px; cursor: pointer; font: 700 12px var(--ui-font); }
.account-avatar::-webkit-details-marker { display: none; }
.account-profile-menu { position: absolute; right: -2px; top: 46px; width: 200px; padding: 12px 8px 16px; display: flex; flex-direction: column; gap: 16px; background: #121212; border: 1px solid #e5e5e54d; }
.account-profile-identity { display: flex; align-items: center; gap: 10px; padding: 0 4px; min-height: 32px; color: inherit; text-decoration: none; }
.account-profile-identity-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.account-profile-menu .account-login-link { max-width: 100%; overflow: visible; white-space: normal; overflow-wrap: anywhere; padding: 0; font: 700 12px/1 var(--ui-font); text-transform: uppercase; text-decoration: none; }
.account-profile-team { font: 700 12px/1.4 var(--ui-font); text-transform: uppercase; color: var(--text-muted); overflow-wrap: anywhere; }
.account-profile-avatar { flex: 0 0 32px; cursor: inherit; }
.account-profile-menu hr { width: 100%; height: 1px; border: 0; margin: 0; background: #e5e5e54d; }
.account-profile-action { display: block; width: 100%; min-height: 24px; border: 0; border-radius: 0; padding: 4px; text-align: left; font: 700 12px/1 var(--ui-font); text-transform: uppercase; background: transparent; color: var(--text-light); }
.account-profile-action:hover:not(:disabled) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.account-profile-action:focus-visible, .account-profile-identity:focus-visible { outline: 2px solid var(--text-light); outline-offset: 4px; }
.account-profile-action:disabled { cursor: not-allowed; opacity: 1; }
.account-home { padding: 10px 24px 24px; }
.account-home-heading h2 { font: 900 48px/.85 "Yango Group Headline", sans-serif; letter-spacing: .48px; text-transform: uppercase; }
.account-home-filters { gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.account-home-filters .ui-button { border-radius: 0; padding: 8px 24px; min-height: 33px; font-size: 12px; border-color: #e5e5e54d; color: #e5e5e599; }
.account-home-filters .ui-button[aria-pressed="true"], .account-home-filters .ui-button:hover { background: var(--text-light); color: var(--bg); border-color: var(--text-light); }
.account-home-filters [hidden] { display: none; }
.account-home-status { font: 12px/1.5 var(--ui-font); }
.account-home-status:empty { display: none; }
.account-home-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.account-creative { min-width: 0; }
.account-creative-tile { position: relative; }
.account-creative-preview { display: block; position: relative; padding: 0; width: 100%; border: 0; background: #ffffff1a; color: var(--text-light); cursor: pointer; }
.account-home-grid img, .account-home-grid video { width: 100%; height: auto; aspect-ratio: 1200 / 628; object-fit: contain; border-radius: 0; background: #ffffff1a; }
.account-creative-edit { position: absolute; right: 8px; bottom: 8px; padding: 6px 10px; background: var(--bg); font: 700 12px var(--ui-font); text-transform: uppercase; opacity: 0; transition: opacity var(--ui-duration); }
.account-creative-preview:hover .account-creative-edit, .account-creative-preview:focus-visible .account-creative-edit { opacity: 1; }
/* Opening a saved set: the card plays the frame loader until its files are cached. */
.account-creative.is-opening .account-creative-preview { cursor: progress; }
.account-creative.is-opening .account-creative-edit, .account-creative.is-opening .account-creative-delete { display: none; }

/* Shared loader for any frame that is generating or still downloading: white dots on
   black, centred. One dot splits into four that orbit out and merge back (goo filter in
   frame-loader.js). Timing traced from the reference GIF: 1.6 s loop, 270° turn,
   0.5 s out, 1.1 s back. */
.frame-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #000;
  container-type: size;
  animation: frame-loader-in 200ms ease-out 120ms both;
}
.frame-loader-dots {
  width: min(50px, 80cqmin);
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
}
.frame-loader-spin {
  transform-origin: 0 0;
  animation: frame-loader-spin 1.6s linear infinite;
}
.frame-loader-dot {
  fill: #e5e5e5;
  transform-origin: 0 0;
  animation: frame-loader-split 1.6s linear infinite;
}
@keyframes frame-loader-in { from { opacity: 0; } }
@keyframes frame-loader-spin { to { transform: rotate(270deg); } }
@keyframes frame-loader-split {
  0%, 100% { transform: translateX(0) scale(1); }
  28% { transform: translateX(80px) scale(0.83); }
  31.25% { transform: translateX(86px) scale(0.8); }
  35% { transform: translateX(80px) scale(0.82); }
}
.video-result-card.is-frame-loading { position: relative; overflow: hidden; }
.video-result-card.is-frame-loading > :not(.frame-loader) { visibility: hidden; }
.account-creative-delete { position: absolute; z-index: 1; left: 8px; bottom: 8px; border: 0; padding: 6px 10px; background: var(--bg); color: var(--text-light); font: 700 12px var(--ui-font); text-transform: uppercase; cursor: pointer; opacity: 0; transition: opacity var(--ui-duration); }
.account-creative-tile:hover .account-creative-delete, .account-creative-tile:focus-within .account-creative-delete { opacity: 1; }
.account-creative-delete:hover { background: var(--text-light); color: var(--bg); }
.account-creative-delete:focus-visible { opacity: 1; outline: 2px solid var(--text-light); outline-offset: 2px; }
.account-creative-delete:disabled { opacity: var(--ui-disabled); cursor: not-allowed; }
@media(hover:none) { .account-creative-delete, .account-creative-edit { opacity: 1; } }
.account-creative-action { margin-top: 8px; width: 100%; }
@media(max-width:700px) { .account-home { padding: 10px 16px 24px; } .account-home-heading h2 { font-size: 36px; } .account-home-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .account-home-filters .ui-button { padding-inline: 14px; } }
@media(max-width:380px) { .account-home-grid { grid-template-columns: 1fr; } }
.account-avatar { position: relative; outline: none; }
.account-avatar::before { content: ""; position: absolute; inset: -3px; background: url('/assets/ui/account-avatar-ring.svg') center / contain no-repeat; pointer-events: none; }
.account-avatar:focus-visible { outline: 2px solid var(--text-light); outline-offset: 4px; }

/* Empty personal gallery: Figma 42:2668 / 42:2675. */
.account-home-heading h2 { font-weight: 800; font-synthesis: none; }
.account-home-intro { margin: 16px 0 0; font: 400 12px/1.5 var(--ui-font); letter-spacing: .24px; }
.account-home-intro[hidden], .account-home-filters[hidden] { display: none; }
.account-home-filters { margin-top: 24px; }
.account-home-filters .ui-button { min-height: 33px; padding: 12px 24px; line-height: 9px; letter-spacing: -.24px; color: var(--text-light); }
.account-home-filters .ui-button[aria-pressed="true"], .account-home-filters .ui-button:hover { background: transparent; color: var(--text-light); border-color: #e5e5e54d; }
.account-home-filters .ui-button:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.account-home-filters .ui-button:focus-visible { outline: 2px solid var(--text-light); outline-offset: 2px; }
.account-library-card > .ui-button { margin-top: 8px; width: 100%; }

.account-library-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.account-library-filters[hidden] { display: none; }
.account-library-filters label { display: flex; flex-direction: column; gap: 8px; font: 700 var(--ui-label)/1.2 var(--ui-font); text-transform: uppercase; }
.account-library-filters select { min-width: 180px; max-width: 100%; height: var(--ui-control); padding: 0 var(--ui-padding); border: var(--ui-border) solid #e5e5e54d; border-radius: var(--ui-radius); background: var(--bg); color: var(--text-light); font: 400 var(--ui-body)/1.2 var(--ui-font); }
.account-library-filters select:focus-visible { outline: 2px solid var(--text-light); outline-offset: 2px; }

.account-team-row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--ui-space); margin: 12px 0; }
.account-team-row label { display: flex; flex-direction: column; gap: var(--ui-space); }

.account-team-management { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--soft-line); font-size: 12px; }
.account-team-management > summary { cursor: pointer; font-weight: 700; }
.account-team-management > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.account-team-management .account-team-row { gap: 8px; margin: 8px 0; }
.account-team-management .account-team-row label { gap: 4px; font-size: 10px; }
.account-team-management .account-team-row input { width: 200px; max-width: 100%; min-height: 32px; height: 32px; padding: 6px 8px; font-size: 12px; }

/* Shared readability and reflow rules for every editor surface. */
.editor-empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 440px; }
.editor-empty-state.hidden { display: none; }
.editor-empty-state h2 { margin: 0; font: 800 32px/1.1 "Yango Group Headline", sans-serif; text-wrap: balance; }
.editor-empty-state p { margin: 0; color: var(--text-muted); font: 400 14px/1.5 var(--ui-font); text-wrap: pretty; }
.ui-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sidebar :is(.text-input, .text-area, .video-story-input, .video-title-input,
    .video-prompt-preview, .video-text-field)::placeholder {
  color: var(--ui-placeholder);
  opacity: 1;
}
.sidebar :is(.edit-prompt-hint, .video-helper-text, .yandex-pro-reference-helper,
    .inline-style-helper, .crm-text-group-hint) {
  color: var(--ui-placeholder);
  line-height: 1.4;
}
.tab-btn { min-height: var(--ui-control); }
#bannerMarkSection { grid-template-rows: auto auto; }
.account-home-filters .ui-button[aria-pressed="true"] {
  border-color: var(--text-light);
  box-shadow: inset 0 -2px var(--text-light);
}
.account-home-filters .ui-button { line-height: 1.25; }
.account-shell :is(label, .account-heading nav, .account-team-row) { min-width: 0; }
.account-shell p, .account-home-status { overflow-wrap: anywhere; }
.operation-panel > div { overscroll-behavior: contain; }
.operation-row p { color: var(--text-muted); }

@media (max-width: 700px) {
  :root { --canvas-gutter: 12px; }
  .brand-title { gap: 6px; }
  .brand-title-yango { font-size: clamp(48px, 16vw, 72px); }
  .brand-title-product { font-size: clamp(26px, 8.4vw, 38px); }
  .canvas-top { justify-content: flex-start; }
  .canvas-top > button { flex: 1 1 auto; }
  .banner-set-grid { grid-template-columns: minmax(0, 1fr); max-width: 360px; margin-inline: auto; }
  .lucky-canvas-grid { grid-template-columns: minmax(0, 1fr); }
  .account-shell :is(input:not([type="checkbox"]), select),
  .sidebar :is(input:not([type="checkbox"]):not([type="range"]), textarea, select),
  .canvas :is(input:not([type="checkbox"]):not([type="range"]), textarea, select) {
    font-size: var(--ui-value);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .dot { opacity: 1; }
}
@media (forced-colors: active) {
  :is(button, input, textarea, select, summary, a, [tabindex]):focus-visible {
    outline: 2px solid Highlight !important;
  }
}

.image-preview-frame:has(.editor-empty-state:not(.hidden)) {
  width: 100%; max-width: none; max-height: none; aspect-ratio: auto; margin: 0;
}
.sidebar .select-display.is-placeholder,
.sidebar select:has(option[value=""]:checked) { color: var(--ui-placeholder); }
.sidebar select option { color: var(--text-dark); }
.select-toggle:disabled .select-display.is-placeholder { color: var(--text-dark); }

/* Service families share the compact select-option rhythm. */
#serviceMenu {
  max-height: min(400px, 50vh);
}
.service-menu-heading:not(:first-child) {
  border-top: var(--ui-border) solid var(--line);
  margin-top: var(--ui-field-gap);
  padding-top: var(--ui-field-gap);
}
.service-menu-heading {
  color: var(--ui-placeholder);
  font-size: var(--ui-label);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--ui-field-gap);
}

/* Local composition guide, using the shared overlay colors. Never exported. */
.banner-position-draft,
.banner-position-photo,
.banner-position-guide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.banner-position-draft { background: var(--bg); }
.banner-position-photo > img,
.banner-position-foreground {
  position: absolute;
  max-width: none;
}
.banner-position-draft { container-type: inline-size; }
.banner-position-block { position: absolute; display: block; border: 0; background: transparent; }
.banner-position-solid { display: block; background: #fff; border: 0; border-radius: 1.5cqw; }
.banner-position-legal { opacity: .5; }

.crm-go-value-palette {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 146px;
  align-items: start;
  gap: var(--ui-field-gap);
}
.crm-go-palette {
  display: grid;
  grid-template-columns: repeat(5, 26px);
  gap: 4px;
}
.crm-go-palette .accent-swatch-btn { width: 26px; height: 26px; border-radius: 6px; }
.crm-go-palette .accent-swatch-core { width: 20px; height: 20px; border-radius: var(--ui-radius-small); }
.crm-go-palette .accent-swatch-core.is-auto {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff 50%, #a6a6a6 50%);
  color: var(--text-dark);
  font: 800 10px/1 var(--ui-font);
}
.crm-go-palette .accent-swatch-btn:focus-visible { outline: 2px solid var(--text-dark); outline-offset: 2px; }
.crm-go-palette .accent-swatch-btn:hover:not(:disabled) { border-color: var(--text-dark); }
.crm-go-palette .accent-swatch-btn:disabled { opacity: var(--ui-disabled); cursor: not-allowed; }
.banner-position-template-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: fill;
}
