/* Short-film takeover: the old UI is the visual master. This layer changes only
 * the approved B result structure and the fixed composer geometry. */

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

@media (min-width: 901px) {
  #home-grid.film-wall {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #home-grid .film-card:nth-child(1),
  #home-grid .film-card:nth-child(8),
  #home-grid .film-card:nth-child(18) {
    grid-column: auto;
  }
}

#home-grid .film-frame {
  aspect-ratio: 16 / 9 !important;
}

#home-grid .film-card:nth-child(1),
#home-grid .film-card:nth-child(8),
#home-grid .film-card:nth-child(18) {
  grid-column: auto;
}

#page-shortfilm .creation-layout {
  display: block;
  min-height: 0;
}

#page-shortfilm .batch-section {
  margin-top: 18px;
  padding-bottom: 136px;
}

#page-shortfilm .state-notes {
  display: none;
}

#shortfilm-form.tko-composer {
  position: fixed !important;
  z-index: 85;
  right: auto !important;
  bottom: 12px !important;
  left: calc(50% + var(--rail-width) / 2) !important;
  display: grid !important;
  width: min(1100px, calc(100vw - var(--rail-width) - 64px)) !important;
  height: 88px !important;
  min-height: 88px !important;
  grid-template-columns: 116px minmax(0, 1fr) 44px auto !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 9px 10px !important;
  overflow: visible !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 16px !important;
  background: #0c0d11 !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.55) !important;
  transform: translateX(-50%) !important;
}

#shortfilm-form.tko-composer::before {
  position: absolute;
  top: -1px;
  right: 24%;
  left: 24%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  content: "";
}

#shortfilm-form .panel-head,
#shortfilm-form .field-label,
#shortfilm-form .field-meta,
#shortfilm-form .option-group,
#shortfilm-form .panel-note,
#shortfilm-form .upload-row,
#shortfilm-form .image-reference-grid {
  display: none !important;
}

#shortfilm-form .mode-tabs {
  display: flex;
  min-width: 0;
  gap: 3px;
}

#shortfilm-form .mode-tabs button {
  min-height: 40px;
  padding: 0 8px;
  font-size: 10px;
}

#shortfilm-form .mode-tabs button .icon {
  width: 15px;
  height: 15px;
}

#shortfilm-form #shortfilm-prompt {
  width: 100% !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  resize: none;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 8px !important;
  background: #08090c !important;
  font-size: 12px !important;
}

#shortfilm-form .generate-summary {
  display: block;
  margin: 0 !important;
}

#shortfilm-form .generate-summary > span {
  display: none;
}

#shortfilm-form #generate-button {
  min-width: 104px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 12px;
}

.tko-add-reference {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
}

.tko-batch {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 70px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c0d11;
}

.tko-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 14px;
}

.tko-batch-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 430;
  letter-spacing: -.025em;
}

.tko-batch-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.tko-config {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tko-config label {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.tko-config select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: 0;
}

.tko-stage {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 480px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 58px;
  border-top: 1px solid rgba(255,255,255,.07);
  background:
    radial-gradient(ellipse at 50% 48%, rgba(122,149,184,.08), transparent 44%),
    #090a0d;
}

.tko-stage[data-aspect="16:9"] {
  min-height: 390px;
}

.tko-card {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: opacity 180ms var(--ease), filter 180ms var(--ease), transform 180ms var(--ease);
}

.tko-card.is-side {
  width: 168px;
  opacity: .58;
  filter: saturate(.7) brightness(.78);
  transform: scale(.94);
}

.tko-card.is-center {
  position: relative;
  z-index: 2;
  width: 230px;
}

.tko-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  background: #030304;
}

[data-aspect="9:16"] .tko-card.is-center .tko-card-media {
  width: 230px;
  aspect-ratio: 9 / 16;
  border-color: rgba(232,237,243,.42);
  box-shadow: 0 18px 52px rgba(0,0,0,.42);
}

[data-aspect="9:16"] .tko-card.is-side .tko-card-media {
  width: 168px;
  aspect-ratio: 9 / 16;
}

[data-aspect="16:9"] .tko-card.is-center .tko-card-media {
  width: min(640px, 45vw);
  aspect-ratio: 16 / 9;
  border-color: rgba(232,237,243,.42);
  box-shadow: 0 18px 52px rgba(0,0,0,.42);
}

[data-aspect="16:9"] .tko-card.is-side .tko-card-media {
  width: min(196px, 20vw);
  aspect-ratio: 16 / 9;
}

[data-aspect="16:9"] .tko-card.is-center {
  width: min(640px, 45vw);
}

[data-aspect="16:9"] .tko-card.is-side {
  width: min(196px, 20vw);
}

.tko-stage.is-centered-row .tko-card-media {
  width: 220px !important;
  aspect-ratio: 9 / 16 !important;
}

.tko-stage.is-centered-row .tko-card {
  width: 220px;
}

.tko-stage.is-centered-row[data-count="2"] .tko-card-media {
  width: min(196px, calc((100% - 12px) / 2)) !important;
}

.tko-stage.is-centered-row[data-count="2"] .tko-card {
  width: min(196px, calc((100% - 12px) / 2));
}

.tko-stage.is-centered-row[data-count="3"] {
  gap: 8px;
}

.tko-stage.is-centered-row[data-count="3"] .tko-card-media {
  width: min(140px, calc((100% - 16px) / 3)) !important;
}

.tko-stage.is-centered-row[data-count="3"] .tko-card {
  width: min(140px, calc((100% - 16px) / 3));
}

.tko-stage[data-aspect="16:9"].is-centered-row .tko-card-media {
  width: 360px !important;
  aspect-ratio: 16 / 9 !important;
}

.tko-stage[data-aspect="16:9"].is-centered-row .tko-card {
  width: min(360px, calc((100% - 12px) / 2));
}

.tko-stage[data-aspect="16:9"].is-centered-row[data-count="2"] .tko-card-media {
  width: min(300px, calc((100% - 12px) / 2)) !important;
}

.tko-stage[data-aspect="16:9"].is-centered-row[data-count="3"] .tko-card-media {
  width: min(220px, calc((100% - 16px) / 3)) !important;
}

.tko-stage[data-aspect="16:9"].is-centered-row[data-count="3"] .tko-card {
  width: min(220px, calc((100% - 16px) / 3));
}

.tko-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tko-card-index,
.tko-card-state {
  position: absolute;
  z-index: 2;
  top: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(3,4,6,.84);
  font-size: 9px;
}

.tko-card-index {
  left: 8px;
}

.tko-card-state {
  right: 8px;
}

.tko-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  background: rgba(5,6,8,.48);
  color: #fff;
  transform: translate(-50%,-50%);
}

.tko-card-copy {
  display: block;
  max-width: 100%;
  padding: 7px 1px 0;
}

.tko-card-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tko-card-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.tko-arrow {
  position: absolute;
  z-index: 4;
  top: 46%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(7,8,10,.86);
  color: var(--ink);
  transform: translateY(-50%);
}

.tko-arrow.prev {
  left: 8px;
}

.tko-arrow.next {
  right: 8px;
}

.tko-arrow:disabled {
  opacity: .24;
}

.tko-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 36px;
  color: var(--muted);
  font-size: 10px;
}

.tko-count strong {
  color: var(--ink);
  font-weight: 500;
}

.tko-viewer {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: #0a0b0e;
  color: var(--ink);
}

.tko-viewer::backdrop {
  background: rgba(2,3,5,.82);
}

.tko-viewer-inner {
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(260px,.7fr);
}

.tko-viewer-media {
  display: grid;
  min-height: 460px;
  place-items: center;
  background: #030304;
}

.tko-viewer-media img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
}

.tko-viewer-copy {
  position: relative;
  padding: 40px 26px 26px;
}

.tko-viewer-copy h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 380;
}

.tko-viewer-copy p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.tko-viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: #111318;
  color: var(--ink);
}

@media (max-width: 900px) {
  #shortfilm-form.tko-composer {
    right: 8px !important;
    bottom: calc(66px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    width: auto !important;
    height: 82px !important;
    min-height: 82px !important;
    grid-template-columns: 44px minmax(0,1fr) 44px !important;
    padding: 8px !important;
    transform: none !important;
  }

  #page-shortfilm .batch-section {
    padding-bottom: calc(184px + env(safe-area-inset-bottom));
  }

  #shortfilm-form .mode-tabs {
    display: none !important;
  }

  #shortfilm-form #shortfilm-prompt {
    height: 52px !important;
    min-height: 52px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  #shortfilm-form .generate-summary {
    grid-column: 3;
  }

  #shortfilm-form #generate-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0;
  }

  #shortfilm-form #generate-button::after {
    font-size: 18px;
    content: "↗";
  }

  .tko-batch {
    padding: 12px;
  }

  .tko-batch-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .tko-config {
    width: 100%;
  }

  .tko-config label {
    min-height: 44px;
    flex: 1;
    justify-content: space-between;
  }

  .tko-stage {
    min-height: 420px;
    padding: 10px 0;
  }

  [data-aspect="9:16"] .tko-card.is-center .tko-card-media {
    width: 220px;
  }

  [data-aspect="9:16"] .tko-card.is-side .tko-card-media {
    width: 146px;
  }

  .tko-stage.is-centered-row .tko-card-media {
    width: 220px !important;
  }

  .tko-stage.is-centered-row .tko-card {
    width: 220px;
  }

  .tko-stage.is-centered-row[data-count="2"] .tko-card {
    width: min(188px, calc((100% - 12px) / 2));
  }

  .tko-stage.is-centered-row[data-count="3"] .tko-card {
    width: min(128px, calc((100% - 16px) / 3));
  }

  .tko-stage[data-aspect="16:9"] .tko-card-media {
    width: min(320px, 68vw) !important;
  }

  .tko-arrow {
    width: 44px;
    height: 44px;
  }

  .tko-viewer-inner {
    grid-template-columns: 1fr;
  }

  .tko-viewer-media {
    min-height: 52vh;
  }
}

@media (max-width: 360px) {
  .tko-stage {
    padding-inline: 0;
  }

  [data-aspect="9:16"] .tko-card.is-center .tko-card-media {
    width: 220px;
  }

  [data-aspect="9:16"] .tko-card.is-side .tko-card-media {
    width: 130px;
  }

  .tko-stage.is-centered-row .tko-card-media {
    width: 174px !important;
  }

  .tko-stage.is-centered-row[data-count="1"] .tko-card,
  .tko-stage.is-centered-row[data-count="1"] .tko-card-media {
    width: 220px !important;
  }
}

.tko-unified-composer {
  display: none;
}

@media (min-width: 901px) {
  #page-shortfilm .creation-kind-switch,
  #shortfilm-form.tko-composer,
  #video-batch-section .tko-config {
    display: none !important;
  }

  #page-shortfilm[data-active-creation-kind="video"] .page-heading {
    display: none !important;
  }

  #page-shortfilm .batch-section {
    padding-bottom: 208px;
  }

  #video-batch-section > .section-heading {
    display: none !important;
  }

  #video-batch-section .tko-batch {
    width: min(970px, 84%);
    margin-inline: auto;
    padding: 14px 16px 12px;
  }

  #video-batch-section .tko-batch-head {
    min-height: 54px;
    padding: 2px 4px 12px;
  }

  #video-batch-section .tko-batch-head h3 {
    font-size: 18px;
  }

  #video-batch-section .tko-batch-head p {
    max-width: 620px;
    line-height: 1.55;
  }

  #video-batch-section .tko-stage {
    --tko-center-width: min(640px, 56vw);
    --tko-center-half: min(320px, 28vw);
    --tko-side-width: min(440px, 34vw);
    display: grid;
    height: 420px;
    min-height: 0;
    padding: 8px 54px;
    place-items: center;
  }

  #video-batch-section .tko-stage[data-aspect="9:16"] {
    --tko-center-width: min(290px, 28vw);
    --tko-center-half: min(145px, 14vw);
    --tko-side-width: min(260px, 24vw);
    height: 565px;
  }

  #video-batch-section [data-aspect="16:9"] .tko-card.is-center,
  #video-batch-section [data-aspect="16:9"] .tko-card.is-center .tko-card-media {
    width: var(--tko-center-width);
  }

  #video-batch-section [data-aspect="9:16"] .tko-card.is-center,
  #video-batch-section [data-aspect="9:16"] .tko-card.is-center .tko-card-media {
    width: var(--tko-center-width);
  }

  #video-batch-section .tko-card.is-side {
    width: 100%;
    opacity: .54;
    filter: saturate(.72) brightness(.72);
    transform: none;
  }

  #video-batch-section .tko-side {
    position: absolute;
    top: 50%;
    width: var(--tko-side-width);
    transform: translateY(-50%);
  }

  #video-batch-section .tko-side.left {
    right: calc(50% + var(--tko-center-half) + 12px);
  }

  #video-batch-section .tko-side.right {
    left: calc(50% + var(--tko-center-half) + 12px);
  }

  #video-batch-section [data-aspect="16:9"] .tko-card.is-side .tko-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  #video-batch-section [data-aspect="9:16"] .tko-card.is-side .tko-card-media {
    width: 100%;
    aspect-ratio: 9 / 16;
  }

  #video-batch-section .tko-arrow {
    top: 50%;
  }

  #video-batch-section .tko-count {
    min-height: 34px;
    padding-top: 2px;
  }

  #page-shortfilm #image-generation:not([hidden]) {
    display: block !important;
  }

  #page-shortfilm #image-generation .image-panel {
    display: none !important;
  }

  #page-shortfilm #image-generation .image-result-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-shortfilm #image-generation .image-result-card:first-child {
    grid-column: auto;
  }

  #page-shortfilm #image-generation .image-result-card .image-result-media {
    aspect-ratio: 4 / 3;
  }

  html[data-takeover-page="shortfilm"] .tko-unified-composer {
    position: fixed;
    z-index: 96;
    right: auto;
    bottom: 12px;
    left: calc(50% + var(--rail-width) / 2);
    display: grid;
    width: min(940px, calc(100vw - var(--rail-width) - 64px));
    height: 176px;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px;
    background:
      radial-gradient(ellipse at 24% -70%, rgba(118,151,194,.12), transparent 58%),
      #17181b;
    box-shadow: 0 30px 90px rgba(0,0,0,.64);
    color: var(--ink);
    transform: translateX(-50%);
  }

  .tko-reference-stack-wrap {
    position: relative;
    width: 112px;
    height: 146px;
    align-self: center;
    outline: 0;
  }

  .tko-reference-stack-wrap:focus-visible {
    border-radius: 10px;
    box-shadow: 0 0 0 2px rgba(159, 199, 238, .6);
  }

  .tko-ref-stack {
    position: absolute;
    inset: 0;
    overflow: visible;
    border-radius: 9px;
    background:
      linear-gradient(150deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
      #111216;
    border: 1px solid rgba(255,255,255,.13);
  }

  .tko-ref-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #7f858f;
    font-size: 9px;
    pointer-events: none;
  }

  .tko-ref-card {
    position: absolute;
    top: 9px;
    left: 8px;
    width: 91px;
    height: 119px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 5px;
    background: #0a0b0d;
    box-shadow: 0 8px 22px rgba(0,0,0,.55);
    transform-origin: 50% 82%;
    transition: transform 180ms var(--ease), opacity 180ms var(--ease);
    transform: translate(-4px, -2px) rotate(-4deg);
  }

  .tko-ref-card:nth-child(2) {
    transform: translate(10px, 4px) rotate(6deg);
  }

  .tko-ref-card:nth-child(3) {
    transform: translate(16px, 7px) rotate(10deg);
  }

  .tko-ref-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #090a0c;
  }

  .tko-reference-stack-wrap:hover .tko-ref-card:nth-child(1),
  .tko-reference-stack-wrap:focus-within .tko-ref-card:nth-child(1) {
    transform: translate(-13px, -2px) rotate(-8deg);
  }

  .tko-reference-stack-wrap:hover .tko-ref-card:nth-child(2),
  .tko-reference-stack-wrap:focus-within .tko-ref-card:nth-child(2) {
    transform: translate(13px, 2px) rotate(4deg);
  }

  .tko-reference-stack-wrap:hover .tko-ref-card:nth-child(3),
  .tko-reference-stack-wrap:focus-within .tko-ref-card:nth-child(3) {
    transform: translate(20px, 6px) rotate(10deg);
  }

  .tko-reference-add {
    position: absolute;
    z-index: 4;
    right: -2px;
    bottom: -2px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    background: #2b2c30;
    color: #f1f3f6;
    font-size: 21px;
    line-height: 1;
    box-shadow: 0 8px 24px rgba(0,0,0,.42);
  }

  .tko-reference-stack-wrap.is-empty .tko-reference-add {
    inset: 0;
    width: 100%;
    height: 100%;
    border-color: rgba(255,255,255,.13);
    border-radius: 9px;
    background:
      linear-gradient(150deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
      #111216;
    font-size: 27px;
    font-weight: 300;
  }

  .tko-reference-stack-wrap.is-empty .tko-reference-add::after {
    margin-top: -42px;
    color: #7f858f;
    font-size: 9px;
    font-weight: 400;
    content: "参考素材";
  }

  .tko-view-all {
    position: absolute;
    z-index: 9;
    top: -34px;
    left: 50%;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 7px;
    background: #303136;
    color: #d6dae0;
    font-size: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 150ms var(--ease);
    white-space: nowrap;
  }

  .tko-reference-stack-wrap:hover .tko-view-all,
  .tko-reference-stack-wrap:focus-within .tko-view-all {
    opacity: 1;
    pointer-events: auto;
  }

  html[data-takeover-page="shortfilm"] .tko-unified-composer.is-assets-expanded {
    height: 326px;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
  }

  html[data-takeover-page="shortfilm"] .tko-unified-composer.is-assets-expanded .tko-reference-stack-wrap {
    display: none;
  }

  html[data-takeover-page="shortfilm"] .tko-unified-composer.is-assets-expanded .tko-creator-main {
    grid-column: 1;
  }

  .tko-asset-manager {
    min-width: 0;
    padding: 3px 2px 0;
  }

  .tko-asset-manager-head {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }

  .tko-asset-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .tko-asset-tabs button {
    min-height: 30px;
    padding: 0 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777e88;
    font-size: 10px;
  }

  .tko-asset-tabs button.is-active {
    background: rgba(255,255,255,.08);
    color: var(--ink);
  }

  .tko-asset-tabs button span {
    margin-left: 3px;
    color: #646b75;
    font-size: 9px;
  }

  .tko-asset-manager-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .tko-asset-manager-actions button {
    min-height: 30px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: #828892;
    font-size: 9px;
  }

  .tko-asset-manager-actions button:hover {
    color: var(--ink);
  }

  .tko-asset-grid {
    display: flex;
    min-height: 78px;
    align-items: flex-start;
    gap: 7px;
    padding-top: 8px;
  }

  .tko-asset-thumb,
  .tko-asset-add {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 6px;
    background: #101115;
  }

  .tko-asset-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .tko-asset-thumb button {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    background: rgba(6,7,9,.82);
    color: #fff;
    font-size: 12px;
  }

  .tko-asset-add {
    display: grid;
    place-items: center;
    color: #969ca5;
    font-size: 22px;
  }

  .tko-asset-add:hover {
    border-color: rgba(255,255,255,.27);
    background: #1c1e22;
  }

  .tko-asset-empty {
    min-height: 78px;
    margin: 8px 0 0;
    padding: 24px 14px;
    border: 1px dashed rgba(255,255,255,.09);
    border-radius: 7px;
    color: #737a84;
    font-size: 10px;
  }

  .tko-creator-main {
    display: grid;
    min-width: 0;
    grid-template-rows: minmax(0, 1fr) 42px 14px;
    gap: 4px;
  }

  #tko-creator-prompt {
    width: 100%;
    min-height: 82px;
    margin: 0;
    padding: 8px 10px 4px;
    overflow: auto;
    resize: none;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.65;
    outline: 0;
  }

  #tko-creator-prompt::placeholder {
    color: #747a84;
  }

  .tko-creator-toolbar {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
  }

  .tko-tool-anchor {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
  }

  .tko-tool-button,
  .tko-duration-pill,
  .tko-points-pill {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #8e949e;
    font-size: 11px;
    white-space: nowrap;
  }

  .tko-tool-button:hover,
  .tko-mode-button[aria-expanded="true"],
  .tko-settings-button[aria-expanded="true"] {
    border-color: rgba(255,255,255,.1);
    background: rgba(255,255,255,.045);
    color: var(--ink);
  }

  .tko-mode-button {
    color: #a8c9ef;
  }

  .tko-mode-button .icon {
    color: #78aee8;
  }

  .tko-chevron-down {
    width: 13px;
    height: 13px;
  }

  .tko-settings-button b {
    color: var(--ink-soft);
    font-weight: 500;
  }

  .tko-settings-button small {
    color: #777e88;
    font-size: 10px;
  }

  .tko-ratio-glyph {
    display: inline-block;
    width: 16px;
    height: 11px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
  }

  .tko-ratio-glyph.is-portrait {
    width: 9px;
    height: 16px;
  }

  .tko-ratio-glyph.is-square {
    width: 13px;
    height: 13px;
  }

  .tko-duration-pill {
    color: #8e949e;
  }

  .tko-optimize-button {
    color: #9aa1ab;
  }

  .tko-toolbar-spacer {
    min-width: 8px;
    flex: 1;
  }

  .tko-points-pill {
    padding-right: 4px;
    color: var(--muted);
  }

  .tko-points-pill b {
    color: var(--ink-soft);
    font-weight: 500;
  }

  .tko-submit-button {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eef1f4;
    color: #08090c;
  }

  .tko-submit-button:hover {
    background: #fff;
    transform: translateY(-1px);
  }

  .tko-submit-button .icon {
    width: 19px;
    height: 19px;
    transform: rotate(-90deg);
  }

  .tko-creator-status {
    margin: 0;
    overflow: hidden;
    color: #737984;
    font-size: 9px;
    line-height: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tko-popover {
    position: absolute;
    z-index: 140;
    bottom: calc(100% + 12px);
    left: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: #1b1c20;
    box-shadow: 0 24px 80px rgba(0,0,0,.64);
    color: var(--ink);
  }

  .tko-mode-menu {
    width: 218px;
    padding: 8px;
  }

  .tko-mode-menu > p {
    margin: 0;
    padding: 8px 10px 7px;
    color: #737984;
    font-size: 10px;
  }

  .tko-mode-menu button {
    display: grid;
    width: 100%;
    min-height: 42px;
    grid-template-columns: 20px 1fr 18px;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #aeb3bc;
    font-size: 12px;
    text-align: left;
  }

  .tko-mode-menu button:hover,
  .tko-mode-menu button.is-selected {
    background: rgba(255,255,255,.07);
    color: var(--ink);
  }

  .tko-mode-menu .tko-selected-check {
    opacity: 0;
  }

  .tko-mode-menu button.is-selected .tko-selected-check {
    opacity: 1;
  }

  .tko-mention-button {
    width: 34px;
    justify-content: center;
    padding: 0;
    color: #a2a8b1;
    font-size: 16px;
  }

  .tko-mention-menu {
    width: 214px;
    padding: 8px;
  }

  .tko-mention-menu > p {
    margin: 0;
    padding: 8px 9px 7px;
    color: #737984;
    font-size: 10px;
  }

  .tko-mention-menu button {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #b7bcc5;
    font-size: 11px;
    text-align: left;
  }

  .tko-mention-menu button:hover {
    background: rgba(255,255,255,.07);
    color: var(--ink);
  }

  .tko-mention-menu button:disabled {
    cursor: not-allowed;
    color: #5f6670;
  }

  .tko-settings {
    width: 410px;
    padding: 16px;
  }

  .tko-settings header {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    display: flex !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 1px 10px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .tko-settings header strong {
    font-size: 12px;
    font-weight: 530;
  }

  .tko-settings header span {
    color: #737984;
    font-size: 9px;
  }

  .tko-ratio-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
  }

  .tko-ratio-grid button {
    display: grid;
    min-height: 76px;
    place-items: center;
    gap: 4px;
    padding: 8px 3px 6px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px;
    background: rgba(255,255,255,.025);
    color: #a1a7b0;
  }

  .tko-ratio-grid button span {
    color: var(--ink-soft);
    font-size: 11px;
  }

  .tko-ratio-grid button small {
    color: #686f79;
    font-size: 8px;
  }

  .tko-ratio-grid button.is-selected {
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.09);
  }

  .tko-ratio-grid button:disabled {
    cursor: not-allowed;
    opacity: .42;
  }

  .ratio-shape {
    display: block;
    border: 1.5px solid currentColor;
    border-radius: 2px;
  }

  .ratio-shape.square {
    width: 16px;
    height: 16px;
  }

  .ratio-shape.landscape-4-3 {
    width: 20px;
    height: 15px;
  }

  .ratio-shape.portrait-3-4 {
    width: 15px;
    height: 20px;
  }

  .ratio-shape.portrait-9-16 {
    width: 11px;
    height: 20px;
  }

  .ratio-shape.landscape-16-9 {
    width: 23px;
    height: 13px;
  }

  .tko-settings .tko-resolution-head {
    margin-top: 14px !important;
    padding-top: 13px !important;
    border-top: 1px solid rgba(255,255,255,.08) !important;
  }

  .tko-resolution-option {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 8px;
    background: rgba(255,255,255,.055);
    color: var(--ink);
    font-size: 12px;
  }

  .tko-resolution-option.is-selected {
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tko-card,
  #shortfilm-form.tko-composer {
    transition-duration: .01ms !important;
  }
}
