:root {
  --creation-bg: #090a0c;
  --creation-panel: #141518;
  --creation-panel-strong: #191a1e;
  --creation-line: rgba(255, 255, 255, 0.1);
  --creation-line-strong: rgba(255, 255, 255, 0.18);
  --creation-muted: #8d9199;
  --creation-text: #f4f4f1;
  --creation-accent: #ff6b3d;
}

.creation-page {
  --mode-accent: var(--creation-accent);
  --mode-accent-soft: rgba(255, 107, 61, 0.14);
  min-height: 100vh;
  color: var(--creation-text);
  background: var(--creation-bg);
}

.creation-header {
  background: rgba(9, 10, 12, 0.94);
  border-bottom-color: var(--creation-line);
  backdrop-filter: blur(18px);
}

.creation-header .main-nav a {
  color: #aeb1b7;
}
.creation-header .main-nav a:hover,
.creation-header .main-nav a.is-active {
  color: #fff;
}

.creation-page .main-nav a.is-active::after {
  background: var(--mode-accent);
}

.creation-main {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 132px 0 112px;
}

.creation-intro {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.creation-intro::before {
  content: "IMAGE CREATION";
  display: block;
  margin-bottom: 11px;
  color: var(--mode-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.creation-page[data-mode="video"] .creation-intro::before {
  content: "VIDEO CREATION";
}

.creation-intro h1 {
  margin: 0;
  color: #fafaf7;
  font-size: 30px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
}

.creation-workbench {
  width: min(850px, 100%);
  margin: 30px auto 0;
}

.creation-composer {
  position: relative;
  padding: 17px 18px 14px;
  overflow: visible;
  background: var(--creation-panel);
  border: 1px solid var(--creation-line-strong);
  border-radius: 8px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.creation-composer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  width: 72px;
  height: 2px;
  background: var(--mode-accent);
}

.creation-composer:focus-within {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
}

.composer-heading {
  position: absolute;
  top: 17px;
  right: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

.composer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #777c84;
  font-size: 11px;
  white-space: nowrap;
}

.composer-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mode-accent);
  box-shadow: 0 0 0 3px var(--mode-accent-soft);
}

.reference-uploader {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 90px 3px 3px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.reference-list {
  display: flex;
  gap: 6px;
}

.prompt-field {
  display: block;
}
.prompt-field textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  max-height: 210px;
  padding: 13px 3px;
  resize: vertical;
  color: #f7f7f4;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
}
.prompt-field textarea::placeholder {
  color: #696d74;
}

.composer-toolbar,
.composer-tools,
.composer-actions {
  display: flex;
  align-items: center;
}

.composer-toolbar {
  justify-content: space-between;
  gap: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--creation-line);
}

.composer-tools {
  min-width: 0;
  gap: 8px;
}

.composer-actions {
  flex: 0 0 auto;
  gap: 12px;
}

.upload-button {
  position: relative;
  flex: 0 0 78px;
  width: 78px;
  height: 38px;
  display: flex;
  flex-direction: row;
  align-items: center;
  place-items: center;
  justify-content: center;
  gap: 4px;
  color: #c6c8cd;
  background: #1b1c20;
  border: 1px solid var(--creation-line);
  border-radius: 8px;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.upload-button:hover {
  color: #fff;
  background: #222328;
  border-color: var(--mode-accent);
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
}

.upload-label {
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.reference-preview {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin: 0;
  overflow: hidden;
  background: #101114;
  border: 1px solid var(--creation-line);
  border-radius: 8px;
}

.reference-open {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.reference-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.2s,
    filter 0.2s;
}

.reference-open:hover img {
  filter: brightness(1.08);
  transform: scale(1.05);
}

.reference-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(8, 9, 11, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  z-index: 1;
}

.reference-remove:hover {
  background: var(--mode-accent);
  border-color: var(--mode-accent);
}

.reference-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 4, 6, 0.88);
  backdrop-filter: blur(12px);
}

.reference-lightbox[hidden] {
  display: none;
}

.reference-lightbox-dialog {
  position: relative;
  display: grid;
  place-items: center;
  max-width: min(92vw, 1180px);
  max-height: 88vh;
}

.reference-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  background: #0d0e11;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.reference-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: #1c1d21;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.reference-lightbox-close:hover {
  background: var(--mode-accent);
  border-color: var(--mode-accent);
}

.creation-page.has-reference-lightbox {
  overflow: hidden;
}

.parameter-field {
  position: relative;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: #93979f;
  background: #17181c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.parameter-field::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 13px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #8e929a;
  border-bottom: 1.5px solid #8e929a;
  transform: rotate(45deg);
  pointer-events: none;
}

.parameter-field:hover {
  color: #c6c8cd;
  background: #1b1d21;
  border-color: rgba(255, 255, 255, 0.22);
}

.parameter-field:focus-within {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.035);
}

.parameter-field > span {
  flex: 0 0 auto;
  font-size: 10px;
}

.parameter-field select {
  min-width: 0;
  max-width: 170px;
  height: 36px;
  padding: 0 22px 0 0;
  color: #dfe0e2;
  background: transparent;
  border: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.parameter-field select option {
  color: #f4f4f1;
  background: #17181c;
}

.parameter-field.is-enhanced > select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-select-trigger {
  min-width: 72px;
  height: 36px;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  padding: 0 22px 0 0;
  overflow: hidden;
  color: #e2e3e5;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: max-content;
  min-width: 100%;
  max-width: min(280px, calc(100vw - 30px));
  display: grid;
  gap: 3px;
  padding: 6px;
  color: #dedfe2;
  background: #1b1c20;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.creation-model-select .custom-select-menu {
  min-width: 230px;
  overflow: visible;
}

.creation-model-provider {
  position: relative;
  border-radius: 8px;
}

.creation-model-provider-trigger {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #e2e3e5;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.creation-model-provider:hover > .creation-model-provider-trigger,
.creation-model-provider.is-open > .creation-model-provider-trigger {
  color: #fff;
  background: var(--mode-accent-soft);
}

.creation-model-provider-name {
  flex: 1;
  font-weight: 650;
}

.creation-model-provider-count {
  min-width: 18px;
  padding: 1px 5px;
  color: var(--mode-accent);
  background: rgba(255, 107, 61, 0.12);
  border-radius: 999px;
  font-size: 10px;
  text-align: center;
}

.creation-model-provider-chevron {
  color: #8d9199;
  font-size: 16px;
  line-height: 1;
}

.creation-model-provider-menu {
  position: absolute;
  top: -7px;
  left: calc(100% + 2px);
  z-index: 2;
  display: none;
  min-width: 230px;
  max-width: min(360px, calc(100vw - 30px));
  max-height: min(320px, calc(100vh - 30px));
  overflow: auto;
  padding: 6px;
  background: #1b1c20;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.creation-model-provider:hover > .creation-model-provider-menu,
.creation-model-provider:focus-within > .creation-model-provider-menu,
.creation-model-provider.is-open > .creation-model-provider-menu {
  display: grid;
  gap: 3px;
}

.creation-model-select .custom-select-menu {
  overflow: visible;
}

.creation-model-select .creation-model-provider-menu {
  scrollbar-width: thin;
}

.custom-select-option {
  position: relative;
  min-width: 120px;
  min-height: 34px;
  padding: 0 30px 0 10px;
  color: #c9cbd0;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
  outline: 0;
}

.custom-select-option[aria-selected="true"] {
  color: #fff;
  background: var(--mode-accent-soft);
}

.custom-select-option[aria-selected="true"]::after {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 10px;
  color: var(--mode-accent);
  font-size: 10px;
}

.parameter-field.is-open {
  color: #c6c8cd;
  background: #1b1d21;
  border-color: rgba(255, 255, 255, 0.28);
}

.parameter-field.is-open::after {
  top: 17px;
  transform: rotate(225deg);
}

.creation-submit {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: var(--mode-accent);
  border: 0;
  border-radius: 50%;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}

.creation-submit:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.creation-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.creation-error {
  margin: 11px 2px 0;
  color: #ff9d87;
  font-size: 11px;
}

.creation-section {
  margin-top: 82px;
}

.creation-results {
  width: min(850px, 100%);
  margin: 28px auto 0;
  padding: 22px;
  scroll-margin-top: 90px;
  background: var(--creation-panel);
  border: 1px solid var(--creation-line-strong);
  border-radius: 8px;
}

.creation-results[hidden],
.library-section[hidden] {
  display: none;
}

#resultStatus,
.result-prompt,
.result-placeholder {
  color: var(--creation-muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.result-prompt {
  white-space: pre-wrap;
}

.result-media {
  display: grid;
  gap: 20px;
}

.creation-output {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.creation-output img,
.creation-output video {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #090a0c;
  border-radius: 5px;
}

.creation-output img {
  cursor: zoom-in;
}

.result-action {
  padding: 8px 12px;
  color: var(--creation-text);
  background: transparent;
  border: 1px solid var(--creation-line-strong);
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.result-action:hover {
  border-color: var(--creation-accent);
}

.recent-project-card video,
.creation-history-placeholder {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: cover;
  background: #101114;
}

.creation-history-placeholder {
  display: grid;
  place-items: center;
  color: var(--creation-muted);
  font-size: 13px;
}

.creation-page button:disabled {
  cursor: default;
  opacity: 0.55;
}

.section-heading {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: #f1f1ee;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.section-actions a {
  color: #999da4;
  font-size: 11px;
  transition: color 0.2s;
}
.section-actions a:hover {
  color: #fff;
}
.section-actions a:last-child {
  color: #e5e6e7;
}
.section-actions a span {
  margin-left: 4px;
  color: var(--mode-accent);
}

.icon-button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #92969e;
  background: transparent;
  border: 1px solid var(--creation-line);
  border-radius: 5px;
  font-size: 15px;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.icon-button:hover {
  color: #fff;
  border-color: var(--creation-line-strong);
}

.recent-projects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.new-project-card,
.recent-project-card {
  min-width: 0;
  min-height: 170px;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
}

.new-project-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 20px;
  color: #c8cad0;
  background: #121316;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.new-project-card:hover {
  color: #fff;
  background: #17181c;
  border-color: var(--mode-accent);
}

.new-project-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #e4e5e7;
  border: 1px solid var(--creation-line-strong);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 300;
}

.new-project-card strong {
  font-size: 12px;
  font-weight: 500;
}

.new-project-card small {
  color: #71757d;
  font-size: 10px;
}

.recent-project-card {
  position: relative;
  display: block;
  padding: 0;
  color: #fff;
  background: #15161a;
  border: 1px solid var(--creation-line);
  text-align: left;
}

.recent-project-card img {
  width: 100%;
  height: 118px;
  display: block;
  object-fit: cover;
  opacity: 0.82;
  transition:
    opacity 0.2s,
    transform 0.35s;
}

.recent-project-card:hover img {
  opacity: 1;
  transform: scale(1.025);
}

.recent-project-card > span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  background: #15161a;
}

.recent-project-card strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.recent-project-card small {
  flex: 0 0 auto;
  color: #747880;
  font-size: 9px;
}

.recent-empty {
  grid-column: span 3;
  min-height: 170px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #6f737b;
  background: #101114;
  border: 1px dashed var(--creation-line-strong);
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
}

.library-section {
  margin-top: 64px;
}

.library-section .section-heading {
  margin-bottom: 14px;
}

.library-section .section-heading > div:first-child {
  min-width: 0;
}

.library-subtitle {
  margin: 5px 0 0;
  color: #696d74;
  font-size: 10px;
}

.library-count {
  color: #8d9199;
  font-size: 11px;
  white-space: nowrap;
}

.member-image-library {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.member-image-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #121316;
  border: 1px solid var(--creation-line);
  border-radius: 7px;
}

.member-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #0d0e11;
}

.member-image-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 44%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34), transparent);
}

.member-image-card-actions {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 1;
  display: flex;
  gap: 5px;
}

.member-image-card-actions a,
.member-image-card-actions button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(8, 9, 11, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.member-image-card-actions a:hover,
.member-image-card-actions button:hover {
  color: #fff;
  background: var(--mode-accent);
  border-color: var(--mode-accent);
}

.member-image-card-copy {
  display: grid;
  gap: 4px;
  padding: 9px 10px 10px;
  border-top: 1px solid var(--creation-line);
}

.member-image-card-copy strong {
  overflow: hidden;
  color: #e9e9e6;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.member-image-card-copy small {
  overflow: hidden;
  color: #747880;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.member-image-library .library-empty {
  grid-column: 1 / -1;
  min-height: 130px;
}

.inspiration-section {
  margin-top: 88px;
}
.inspiration-heading {
  margin-bottom: 13px;
}
.inspiration-heading > span {
  color: #696d74;
  font-size: 10px;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  margin: 0 0 20px;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.category-filter::-webkit-scrollbar {
  display: none;
}

.category-filter button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 12px;
  color: #7e828a;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.category-filter button:hover,
.category-filter button.is-active {
  color: #fff;
  border-bottom-color: var(--mode-accent);
}

.template-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.template-card {
  min-width: 0;
  display: block;
  overflow: hidden;
  padding: 0;
  color: #fff;
  background: #121316;
  border: 1px solid var(--creation-line);
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.template-card:hover {
  border-color: var(--mode-accent);
  transform: translateY(-2px);
}

.template-visual {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1a1b1f;
}

.template-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0.88;
  transform: translateX(var(--prompt-x, 0%)) scale(var(--prompt-scale, 1));
  transition:
    opacity 0.25s,
    transform 0.4s;
}

.template-card:hover .template-visual img {
  opacity: 1;
}

.template-visual em {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 7px;
  color: #d7d8da;
  background: rgba(9, 10, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  font-size: 9px;
  font-style: normal;
}

.template-copy {
  position: relative;
  min-height: 82px;
  display: block;
  padding: 13px 38px 14px 14px;
  border-top: 1px solid var(--creation-line);
}

.template-copy::after {
  content: "↗";
  position: absolute;
  top: 13px;
  right: 14px;
  color: #5f646c;
  font-size: 12px;
  transition:
    color 0.2s,
    transform 0.2s;
}

.template-card:hover .template-copy::after {
  color: var(--mode-accent);
  transform: translate(1px, -1px);
}

.template-copy strong {
  display: block;
  overflow: hidden;
  color: #e9e9e6;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.template-copy small {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: #777b83;
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-only {
  display: none;
}
.creation-page[data-mode="video"] .video-only {
  display: flex;
}

.creation-page :is(a, button, select, textarea):focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.38);
  outline-offset: 2px;
}

.creation-composer textarea:focus-visible,
.creation-composer select:focus-visible,
.custom-select-trigger:focus-visible {
  outline: 0;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 900px) {
  .creation-main {
    width: min(100% - 40px, 760px);
    padding-top: 112px;
  }
  .recent-projects,
  .template-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .member-image-library {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .recent-empty {
    grid-column: span 1;
  }
  .creation-header .main-nav {
    max-width: 100%;
  }
}

@media (max-width: 620px) {
  .creation-main {
    width: calc(100% - 30px);
    padding: 100px 0 76px;
  }
  .creation-intro h1 {
    font-size: 25px;
  }
  .creation-workbench {
    margin-top: 24px;
  }
  .creation-composer {
    padding: 15px 14px 13px;
  }
  .composer-heading {
    top: 15px;
    right: 14px;
  }
  .reference-uploader {
    padding-right: 82px;
  }
  .prompt-field textarea {
    min-height: 124px;
    font-size: 14px;
  }
  .composer-toolbar {
    align-items: flex-end;
    flex-wrap: wrap;
  }
  .composer-tools {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 78px;
  }
  .creation-page[data-mode="video"] .composer-tools {
    grid-template-columns: minmax(0, 1fr) 66px 66px;
  }
  .parameter-field {
    padding-inline: 12px;
  }
  .parameter-field > span {
    display: none;
  }
  .parameter-field select {
    width: 100%;
    max-width: none;
  }
  .composer-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .creation-section,
  .inspiration-section {
    margin-top: 64px;
  }
  .section-heading {
    align-items: flex-start;
    gap: 14px;
  }
  .section-heading h2 {
    font-size: 18px;
  }
  .section-actions {
    gap: 12px;
  }
  .section-actions a:first-of-type,
  .inspiration-heading > span {
    display: none;
  }
  .recent-projects {
    grid-template-columns: 1fr;
  }
  .member-image-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .library-section .section-heading {
    align-items: center;
  }
  .library-subtitle {
    max-width: 220px;
    line-height: 1.45;
  }
  .template-list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(82vw, 310px);
    gap: 12px;
    overflow-x: auto;
    margin-right: -15px;
    padding: 0 15px 10px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .template-list::-webkit-scrollbar {
    display: none;
  }
  .template-card {
    scroll-snap-align: start;
  }
  .new-project-card,
  .recent-project-card,
  .recent-empty {
    min-height: 150px;
  }
  .recent-project-card img {
    height: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .creation-page *,
  .creation-page *::before,
  .creation-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 390px) {
  .creation-page[data-mode="video"] .composer-tools {
    grid-template-columns: minmax(0, 1fr) 62px 62px;
  }
}
