.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
}

.home-package-action-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.path-file-name {
  grid-column: 1 / -1;
  min-height: 18px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-subsection {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);

  h2 {
    margin: 0;
    font-size: 15px;
  }
}

.textarea-label,
.stacked-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.dynamic-path-list {
  display: grid;
  gap: 8px;
}

.dynamic-path-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.skin-tool-row {
  margin-top: 10px;
}

.skin-project-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.skin-project-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 86px;
  padding: 12px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);

  input {
    margin-top: 4px;
  }

  span {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  strong {
    color: #fff;
    font-size: 16px;
    line-height: 1.2;
  }

  small {
    color: #c7d0d9;
    line-height: 1.35;
  }

  &:has(input:checked) {
    border-color: rgba(23, 195, 178, 0.75);
    background: rgba(23, 195, 178, 0.08);
  }
}

.skin-template-start {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: var(--border-width) solid rgba(23, 195, 178, 0.6);
  border-left: 3px solid var(--accent);
  background: rgba(23, 195, 178, 0.06);
}

.skin-template-copy {
  display: grid;
  gap: 6px;
  max-width: 980px;

  strong {
    color: #fff;
    font-size: 20px;
  }

  span,
  small {
    color: #c7d0d9;
    line-height: 1.45;
  }

  small {
    color: var(--muted);
  }

  code {
    color: #fff;
    padding: 1px 4px;
    border: var(--border-width) solid var(--line-soft);
    background: rgba(0, 0, 0, 0.24);
  }
}

.skin-cardesign-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;

  input {
    border-color: rgba(23, 195, 178, 0.8);
    background: #0d1718;
  }
}

.skin-visual-variant-info {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: var(--border-width) solid rgba(23, 195, 178, 0.52);
  background: rgba(23, 195, 178, 0.085);

  &[hidden] {
    display: none;
  }

  &.is-unknown {
    border-color: rgba(247, 201, 72, 0.55);
    background: rgba(247, 201, 72, 0.075);
  }
}

.skin-visual-variant-kicker {
  color: #9de8df;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.skin-visual-variant-label {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.skin-visual-variant-meta {
  min-height: 16px;
  color: #c7d0d9;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.skin-paint-variant-row {
  display: grid;
  gap: 6px;
  color: #dbe6ea;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;

  &[hidden] {
    display: none;
  }

  select {
    min-height: 38px;
    border-color: rgba(23, 195, 178, 0.65);
    background: #0d1718;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: none;
  }
}

.skin-template-toggle {
  justify-self: start;
  border-color: rgba(23, 195, 178, 0.45);
  background: rgba(23, 195, 178, 0.1);
}

.skin-template-advanced {
  padding: 12px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);

  &[hidden] {
    display: none;
  }
}

.skin-identity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.skin-identity-grid .skin-name-field,
.skin-identity-grid .skin-id-preview,
.skin-identity-grid .skin-author-field,
.skin-identity-grid .skin-description-field,
.skin-identity-grid .skin-id-override {
  width: 100%;
  min-width: 0;
}

.official-project-fields {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: start;
  align-items: stretch;
  gap: 0;
  margin-top: 0;
  padding: 0;
  min-height: 0;
  height: 100%;
  border: 0;
  background: transparent;
  overflow: hidden;

  &[hidden] {
    display: none;
  }
}

body[data-workflow-scope="advanced"] #tab-skin.active {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

body[data-workflow-scope="advanced"] .tool-content:has(#tab-skin.active) {
  overflow: hidden;
}

body[data-workflow-scope="advanced"] #tab-skin > .panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body[data-workflow-scope="advanced"] #skinIdentityAnchor,
body[data-workflow-scope="advanced"] #skinCreatorActionsAnchor {
  display: none;
}

body[data-workflow-scope="official"] #tab-skin.active {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

body[data-workflow-scope="official"] .tool-content:has(#tab-skin.active) {
  overflow: hidden;
}

body[data-workflow-scope="official"] #tab-skin > .panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body[data-workflow-scope="official"] #skinIdentityAnchor,
body[data-workflow-scope="official"] #skinCreatorActionsAnchor {
  display: none;
}

body[data-workflow-scope="official"] #officialExternalProjectFields {
  grid-row: 2;
  min-height: 0;
}

.official-creator-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  align-content: start;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.official-car-catalog,
.official-creator-details {
  min-width: 0;
  align-self: start;
}

.official-creator-details {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-2-rgb), 0.72) rgba(0, 0, 0, 0.18);
}

.official-car-catalog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.official-car-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.official-car-search {
  flex: 1 1 260px;
  min-width: 180px;
  max-width: 360px;
  height: 30px;
  padding: 6px 10px;
  border: var(--border-width) solid var(--line-soft);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe6ea;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.official-car-search::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.official-car-search:focus {
  border-color: rgba(23, 195, 178, 0.7);
  outline: none;
}

.official-car-search::-webkit-search-cancel-button {
  width: 15px;
  height: 15px;
  margin-left: 6px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;

  &:hover {
    background: #fff;
  }
}

.official-car-toolbar span {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.official-car-toolbar button {
  min-height: 30px;
  padding: 6px 10px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  color: #dbe6ea;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;

  &.active,
  &:hover,
  &:focus-visible {
    border-color: rgba(23, 195, 178, 0.7);
    background: rgba(23, 195, 178, 0.12);
    color: var(--accent-3);
  }
}

.official-creator-panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

body:not([data-workflow-scope="official"]) .official-creator-panel-actions {
  display: none;
}

.official-creator-panel-actions .home-health-summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.official-car-grid {
  --official-car-gap: 10px;
  --official-card-width: calc((100% - 40px) / 5);

  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: var(--official-car-gap);
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
  scrollbar-gutter: stable;
}

.official-car-group {
  display: grid;
  gap: 8px;
  flex: 1 0 100%;
  min-width: 0;
}

.official-car-group-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 3px 0 5px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);
}

.official-car-group-head strong {
  color: var(--accent-3);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.official-car-group-body {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: var(--official-car-gap);
  min-width: 0;
}

@media (max-width: 1700px) {
  .official-car-grid {
    --official-card-width: calc((100% - 30px) / 4);
  }
}

@media (max-width: 1360px) {
  .official-car-grid {
    --official-card-width: calc((100% - 20px) / 3);
  }
}

.official-creator-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.official-creator-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.official-creator-form input,
.official-creator-form select {
  width: 100%;
}

.official-saved-car-picker {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.official-saved-car-picker.is-automatic {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(93, 214, 156, 0.36);
  background: rgba(14, 45, 34, 0.72);
}

.official-saved-car-picker.is-automatic span,
.official-saved-car-picker.is-automatic small {
  color: var(--text-muted);
}

.official-saved-car-picker.is-automatic strong {
  color: #74e6aa;
}

.official-saved-car-picker select {
  grid-column: 1;
}

.official-saved-car-picker button {
  grid-column: 2;
  grid-row: 2;
  min-height: 38px;
  white-space: nowrap;
}

.official-vehicle-variant-row small {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.official-selected-car {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-bottom: 6px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);
}

.official-selected-car span {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.official-selected-car strong {
  color: var(--accent-3);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.official-selected-car small {
  color: #aeb9c2;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.official-creator-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 0;
}

.official-creator-identity .skin-id-preview {
  min-height: 36px;
}

.official-creator-actions {
  display: grid;
  margin-top: 2px;
}

.official-creator-actions .primary {
  width: 100%;
  justify-content: center;
}

.creator-preview-asset-status {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);

  span {
    color: #aeb9c2;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
  }

  strong {
    color: #dbe6ea;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  small {
    color: #aeb9c2;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &.is-ready {
    border-color: rgba(163, 217, 119, 0.58);
    background: rgba(163, 217, 119, 0.08);

    strong {
      color: #c7f0a4;
    }
  }

  &.is-warning,
  &.is-loading {
    border-color: rgba(247, 201, 72, 0.58);
    background: rgba(247, 201, 72, 0.075);

    strong {
      color: #f3d46d;
    }
  }

  &.is-idle {
    opacity: 0.82;
  }
}

.official-car-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 var(--official-card-width);
  max-width: var(--official-card-width);
  min-width: 0;
  width: auto;
  padding: 0;
  border: var(--border-width) solid var(--line-soft);
  border-radius: 0;
  background: #05070a;
  color: #dbe6ea;
  text-align: left;
  cursor: pointer;
  overflow: hidden;

  &:hover,
  &:focus-visible {
    border-color: rgba(23, 195, 178, 0.7);
    background: #05070a;
  }

  &.active {
    border-color: var(--accent);
    background: #05070a;
  }

  &.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
    pointer-events: none;
  }
}

.official-car-favorite-toggle {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: var(--border-width) solid transparent;
  background: rgba(0, 0, 0, 0.42);
  color: #aeb9c2;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;

  &.is-active,
  &:hover,
  &:focus-visible {
    color: #f3d46d;
    background: rgba(0, 0, 0, 0.56);
    outline: none;
  }
}

.official-car-thumb-frame {
  position: relative;
  min-width: 0;
  background: #111820;
}

.official-car-thumb-pills {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: calc(100% - 12px);
  pointer-events: none;
}

.official-car-thumb-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 6px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 7, 10, 0.74);
  color: #dbe6ea;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;

  &.is-race {
    border-color: rgba(255, 202, 82, 0.58);
    color: #ffdd88;
  }

  &.is-road {
    border-color: rgba(23, 195, 178, 0.58);
    color: var(--accent-3);
  }

  &.is-ready,
  &.is-variants {
    border-color: rgba(163, 217, 119, 0.5);
    color: #c7f0a4;
  }

  &.is-warning {
    border-color: rgba(255, 113, 113, 0.58);
    color: #ff9a9a;
  }
}

.official-car-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #111820;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);
}

.official-car-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px 11px;
  background: #05070a;

  strong,
  small,
  span {
    overflow-wrap: anywhere;
  }

  strong {
    color: var(--accent-3);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
  }

  small,
  span {
    color: #aeb9c2;
    font-size: 13px;
    line-height: 1.25;
  }
}

.advanced-creator-panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

body[data-workflow-scope="official"] .advanced-creator-panel-actions {
  display: none;
}

.advanced-creator-panel-actions .home-health-summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advanced-creator-fields {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: start;
  align-items: stretch;
  gap: 0;
  margin-top: 0;
  padding: 0;
  min-height: 0;
  height: 100%;
  border: 0;
  background: transparent;
  overflow: hidden;

  &[hidden] {
    display: none;
  }
}

body[data-workflow-scope="advanced"] #advancedCreatorFields {
  grid-row: 2;
  min-height: 0;
}

.advanced-creator-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  align-content: start;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.advanced-car-catalog,
.advanced-creator-details {
  min-width: 0;
  align-self: start;
}

.advanced-creator-details {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-2-rgb), 0.72) rgba(0, 0, 0, 0.18);
}

.advanced-car-catalog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.advanced-car-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.advanced-car-search {
  flex: 1 1 260px;
  min-width: 180px;
  max-width: 360px;
  height: 30px;
  padding: 6px 10px;
  border: var(--border-width) solid var(--line-soft);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe6ea;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.advanced-car-search::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.advanced-car-search:focus {
  border-color: rgba(23, 195, 178, 0.7);
  outline: none;
}

.advanced-car-toolbar span {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.advanced-car-toolbar button {
  min-height: 30px;
  padding: 6px 10px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  color: #dbe6ea;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;

  &.active,
  &:hover,
  &:focus-visible {
    border-color: rgba(23, 195, 178, 0.7);
    background: rgba(23, 195, 178, 0.12);
    color: var(--accent-3);
  }
}

.advanced-car-grid {
  --advanced-car-gap: 10px;
  --advanced-card-width: calc((100% - 40px) / 5);

  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: var(--advanced-car-gap);
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
  scrollbar-gutter: stable;
}

.advanced-car-group {
  display: grid;
  gap: 8px;
  flex: 1 0 100%;
  min-width: 0;
}

.advanced-car-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 3px 0 5px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);
}

.advanced-car-group-head strong {
  color: var(--accent-3);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.advanced-car-group-head span {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.advanced-car-group-body {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: var(--advanced-car-gap);
  min-width: 0;
}

@media (max-width: 1700px) {
  .advanced-car-grid {
    --advanced-card-width: calc((100% - 30px) / 4);
  }
}

@media (max-width: 1360px) {
  .advanced-car-grid {
    --advanced-card-width: calc((100% - 20px) / 3);
  }
}

.advanced-creator-form {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.advanced-creator-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.advanced-creator-form input,
.advanced-creator-form select {
  width: 100%;
}

.advanced-creator-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 0;
}

.advanced-creator-identity .skin-id-preview {
  min-height: 36px;
}

.advanced-creator-actions {
  display: grid;
  margin-top: 2px;
}

.advanced-creator-actions .primary {
  width: 100%;
  justify-content: center;
}

.advanced-creator-template-row small {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.creator-option-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.creator-option-group[hidden] {
  display: none;
}

.creator-option-group-head {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.creator-option-group-head span {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.creator-option-group-head small {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.creator-option-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.creator-option-card {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  color: #dbe6ea;
  cursor: pointer;
}

.creator-option-card:hover,
.creator-option-card:focus-within,
.creator-option-card.active {
  border-color: rgba(23, 195, 178, 0.7);
  background: rgba(23, 195, 178, 0.08);
}

.creator-option-card.has-thumb {
  grid-template-columns: 18px 72px minmax(0, 1fr);
  align-items: center;
}

.creator-option-card.official-variant-option {
  grid-template-columns: minmax(0, 1fr);
}

.creator-option-card.official-variant-option.has-thumb {
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
}

.creator-option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.creator-option-control {
  display: block;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(5, 7, 10, 0.72);
}

.creator-option-card input:checked + .creator-option-control {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px #05070a;
  background: var(--accent);
}

.creator-option-card.has-thumb .creator-option-control {
  margin-top: 0;
}

.creator-option-thumb {
  display: block;
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  min-width: 0;
  overflow: hidden;
  border: var(--border-width) solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 7, 10, 0.72);
}

.creator-option-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-template-empty {
  padding: 9px 10px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #aeb9c2;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;

  &.is-warning {
    border-color: rgba(247, 201, 72, 0.5);
    background: rgba(247, 201, 72, 0.065);
    color: #f3d46d;
  }
}

.creator-template-option.is-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.creator-option-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.creator-option-copy strong {
  color: var(--accent-3);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.creator-option-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.creator-option-meta span {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  color: #aeb9c2;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.creator-option-meta b {
  color: #dbe6ea;
  font-weight: 900;
  text-transform: uppercase;
}

.advanced-selected-car {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-bottom: 6px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);
}

.advanced-selected-car span {
  color: #aeb9c2;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.advanced-selected-car strong {
  color: var(--accent-3);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.advanced-selected-car small {
  color: #aeb9c2;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.advanced-car-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 var(--advanced-card-width);
  max-width: var(--advanced-card-width);
  min-width: 0;
  padding: 0;
  border: var(--border-width) solid var(--line-soft);
  border-radius: 0;
  background: #05070a;
  color: #dbe6ea;
  text-align: left;
  cursor: pointer;
  overflow: hidden;

  &:hover,
  &:focus-visible {
    border-color: rgba(23, 195, 178, 0.7);
    background: #05070a;
  }

  &.active {
    border-color: var(--accent);
    background: #05070a;
  }
}

.advanced-car-favorite-toggle {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: var(--border-width) solid transparent;
  background: rgba(0, 0, 0, 0.42);
  color: #aeb9c2;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;

  &.is-active,
  &:hover,
  &:focus-visible {
    color: #f3d46d;
    background: rgba(0, 0, 0, 0.56);
    outline: none;
  }
}

.advanced-car-thumb-frame {
  position: relative;
  min-width: 0;
  background: #111820;
}

.advanced-car-thumb-pills {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: calc(100% - 12px);
  pointer-events: none;
}

.advanced-car-thumb-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 6px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 7, 10, 0.74);
  color: #dbe6ea;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;

  &.is-race {
    border-color: rgba(255, 202, 82, 0.58);
    color: #ffdd88;
  }

  &.is-road {
    border-color: rgba(23, 195, 178, 0.58);
    color: var(--accent-3);
  }

  &.is-ready,
  &.is-variants {
    border-color: rgba(163, 217, 119, 0.5);
    color: #c7f0a4;
  }

  &.is-warning {
    border-color: rgba(255, 113, 113, 0.58);
    color: #ff9a9a;
  }
}

.advanced-car-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #111820;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);
}

.advanced-car-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px 11px;
  background: #05070a;
}

.advanced-car-info strong,
.advanced-car-info small,
.advanced-car-info span {
  overflow-wrap: anywhere;
}

.advanced-car-info strong {
  color: var(--accent-3);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.advanced-car-info small,
.advanced-car-info span {
  color: #aeb9c2;
  font-size: 13px;
  line-height: 1.25;
}

.skin-id-preview {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: #c7d0d9;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.skin-id-override[hidden] {
  display: none;
}

.numberplate-creator-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 10px;
  align-items: end;
  padding: 14px;
  border: var(--border-width) solid rgba(23, 195, 178, 0.45);
  border-left: 3px solid var(--accent);
  background: rgba(23, 195, 178, 0.045);

  label {
    min-width: 0;
  }

  .inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;

    input {
      width: auto;
      min-height: 0;
    }
  }
}

.numberplate-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: var(--border-width) solid var(--line-soft);

  h2,
  h3 {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    color: var(--muted);
    font-size: 14px;
  }
}

.numberplate-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.numberplate-asset-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.numberplate-asset-preview {
  width: 92px;
  height: 52px;
  object-fit: contain;
  border: var(--border-width) solid var(--line-soft);
  background: #0c0f14;
}

.numberplate-asset-copy {
  min-width: 0;
}

.numberplate-asset-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.numberplate-asset-action {
  width: 100%;
}

[data-loading-surface] {
  position: relative;
}

.tool-loading {
  display: grid;
  place-items: center;
  gap: 10px;
  min-width: 220px;
  min-height: 0;
  padding: 22px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);
  color: #dce4ec;
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;

  .button-spinner {
    width: 22px;
    height: 22px;
  }
}

.tool-loading-overlay {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.skin-tool-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: var(--border-width) solid var(--line);
  border-radius: 0px;
  background: rgba(255, 255, 255, 0.03);

  span {
    color: var(--muted);
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    word-break: break-all;
  }
}

.actions,
.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.toggles {
  label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-size: 15px;

    &.is-disabled {
      opacity: .5;
    }
  }

  input {
    width: auto;
    min-height: 0;
  }
}

.crumbs {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  border-bottom: var(--border-width) solid var(--line);
  margin-bottom: 6px;
  padding-bottom: 6px;

  button {
    min-height: 28px;
  }
}

.browser-favorites {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;

  label {
    min-width: 0;
  }

  select {
    min-width: 0;
  }
}

.favorite-col,
.favorite-cell,
.compat-col,
.compat-cell {
  width: 34px;
  text-align: center;
}

.favorite-col,
.compat-col {
  padding-left: 4px;
  padding-right: 4px;
}

.compat-col,
.compat-cell {
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  padding-left: 2px;
  padding-right: 2px;
}

.browser-compat-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: var(--border-width) solid var(--line);
  border-radius: 0;
  color: #c7d0d9;
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.browser-scope-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  overflow: hidden;
  color: #707985;
  font-size: 0;

  &::before {
    content: "";
    width: 13px;
    height: 13px;
    background: currentColor;
  }

  &.is-locked::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 7V5.5C5 3.57 6.57 2 8.5 2S12 3.57 12 5.5V7h.5A1.5 1.5 0 0 1 14 8.5v4A1.5 1.5 0 0 1 12.5 14h-8A1.5 1.5 0 0 1 3 12.5v-4A1.5 1.5 0 0 1 4.5 7H5Zm1.5 0h4V5.5a2 2 0 0 0-4 0V7Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 7V5.5C5 3.57 6.57 2 8.5 2S12 3.57 12 5.5V7h.5A1.5 1.5 0 0 1 14 8.5v4A1.5 1.5 0 0 1 12.5 14h-8A1.5 1.5 0 0 1 3 12.5v-4A1.5 1.5 0 0 1 4.5 7H5Zm1.5 0h4V5.5a2 2 0 0 0-4 0V7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  &.is-unlocked {
    color: #8a95a1;
  }

  &.is-unlocked::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M6.5 7h6A1.5 1.5 0 0 1 14 8.5v4a1.5 1.5 0 0 1-1.5 1.5h-8A1.5 1.5 0 0 1 3 12.5v-4A1.5 1.5 0 0 1 4.5 7H5V5.5C5 3.57 6.57 2 8.5 2c1.57 0 2.9 1.04 3.34 2.47l-1.43.43A2 2 0 0 0 6.5 5.5V7Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M6.5 7h6A1.5 1.5 0 0 1 14 8.5v4a1.5 1.5 0 0 1-1.5 1.5h-8A1.5 1.5 0 0 1 3 12.5v-4A1.5 1.5 0 0 1 4.5 7H5V5.5C5 3.57 6.57 2 8.5 2c1.57 0 2.9 1.04 3.34 2.47l-1.43.43A2 2 0 0 0 6.5 5.5V7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

:root.is-debug-mode .browser-scope-status {
  color: #c7d0d9;
}

.browser-compat-status.status-ready {
  border-color: rgba(95, 210, 154, 0.55);
  color: #92e5bb;
}

.browser-compat-status.status-paint_only {
  border-color: rgba(95, 210, 154, 0.55);
  color: #92e5bb;
}

.browser-compat-status.status-liverylab_livery {
  border-color: #f7c948;
  color: #f7c948;
}

.browser-compat-status.status-unsupported {
  border-color: rgba(228, 99, 99, 0.6);
  color: #f09a9a;
}

.browser-compat-status.status-unknown {
  border-color: rgba(150, 170, 190, 0.5);
  color: #c7d0d9;
}

.browser-analysis-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 9px;
  padding: 9px;
  border: var(--border-width) solid var(--line-soft);
  background: rgba(255, 255, 255, 0.025);

  &[hidden] {
    display: none;
  }

  > span {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 2px 7px;
    align-items: center;
    min-width: 0;
  }

  .browser-compat-status {
    grid-row: 1 / span 2;
  }

  strong,
  small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  strong {
    color: #d9e1e8;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
  }

  small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.15;
  }
}

.browser-favorite-toggle {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: var(--border-width) solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;

  &:hover {
    color: #f3d46d;
    background: rgba(255, 255, 255, 0.04);
  }

  &.is-active {
    color: #f3d46d;
  }
}

.table-wrap {
  overflow: auto;
  min-height: 0;
  height: auto;
  flex: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  font-weight: 600;
}

th,
td {
  border-bottom: var(--border-width) solid var(--line-soft);
  padding: 8px 7px;
  text-align: left;
  vertical-align: middle;
  color: #d9e1e8;
}

th {
  color: var(--muted);
  font-weight: 700;
  background: #10161d;
  position: sticky;
  top: 0;
  z-index: 1;
}

tr.browser-row-muted {
  td {
    color: #6f7882;
  }

  .browser-favorite-toggle,
  button {
    color: #6f7882;
    opacity: 0.72;
  }
}

tr.browser-row-hard-locked {
  cursor: not-allowed;
}

:root.is-debug-mode tr.browser-row-muted {
  td {
    color: #d9e1e8;
  }

  .browser-favorite-toggle,
  button {
    color: inherit;
    opacity: 1;
  }
}

.browser-workflow-target {
  color: #92e5bb;
  font-weight: 800;
}

.browser-workflow-liverylab {
  color: #f7c948;
  font-weight: 800;
}

.browser-workflow-blocked {
  color: #f09a9a;
  font-weight: 800;
}

tr.browser-row-template-unsupported {
  td {
    color: #f0b0b0;
  }
}

tr {
  &.selected {
    background: var(--accent-2);
    color: #fff;
    outline: var(--border-width) solid rgba(var(--accent-2-rgb), 0.72);

    td {
      color: #fff;
    }

    td:first-child {
      font-weight: 700;
    }

    .browser-workflow-target,
    .browser-workflow-liverylab,
    button,
    .browser-favorite-toggle {
      color: #fff;
    }
  }

  &.is-dragging {
    opacity: 0.55;
  }
}

tbody {
  tr:hover {
    background: rgba(255, 255, 255, 0.035);
  }

  tr.selected:hover {
    background: var(--accent-2);
  }
}

.chip-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 12px;

  &.compact {
    grid-template-columns: 1fr;
    margin-top: 0;
  }
}

.chip {
  border: var(--border-width) solid var(--line);
  border-radius: 0px;
  padding: 9px;
  background: var(--panel-2);
  min-width: 0;

  &.danger {
    border-color: rgba(255, 92, 92, 0.5);
    background: rgba(255, 92, 92, 0.08);
  }

  strong,
  span {
    display: block;
    overflow-wrap: anywhere;
  }

  span {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
  }
}

.about-features .chip strong {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  text-transform: uppercase;
}

.about-features .chip > span {
  color: #c7d0d9;
  font-size: 16px;
  line-height: 1.55;
}

.about-creator-copy {
  font-size: 16px;
}

.output,
.logbar pre {
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
}

.output {
  background: #0d1116;
  border: var(--border-width) solid var(--line);
  border-radius: 0px;
  padding: 10px;
  min-height: 260px;
  max-height: calc(100vh - 395px);
  box-shadow: inset 3px 0 0 rgba(var(--accent-2-rgb), 0.58);

  &.small {
    min-height: 210px;
    max-height: 250px;
  }

  &.tall {
    min-height: calc(100vh - 315px);
  }
}

.selection-box {
  border-top: var(--border-width) solid var(--line);
  padding-top: 10px;
  min-height: 0;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;

  button {
    padding: 0 6px;
    min-width: 0;
    color: #d7e0e8;
    background: #141b22;
  }
}

.file-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;

  button {
    min-width: 0;
  }

  .danger {
    border-color: rgba(var(--accent-2-rgb), 0.55);
    background: rgba(var(--accent-2-rgb), 0.14);
  }
}

.preview-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px 34px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;

  input {
    min-width: 0;
  }

  span {
    min-width: 46px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
  }

  button {
    min-width: 0;
    padding: 0;
  }
}

