.nuu3d-others-page,
.nuu3d-timelapse-page {
  padding-bottom: 48px;
}

.nuu3d-others-page .nuu3d-card-grid {
  max-width: 1100px;
  margin: 0 auto;
}

.nuu3d-others-back {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--v3-muted);
  font-size: 14px;
  text-decoration: none;
}

.nuu3d-timelapse-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: 24px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.nuu3d-timelapse-visual,
.nuu3d-timelapse-panel {
  margin: 0;
  border: 1px solid var(--v3-line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--v3-surface);
}

.nuu3d-timelapse-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.nuu3d-timelapse-panel {
  padding: 28px;
}

.nuu3d-timelapse-panel fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.nuu3d-timelapse-panel legend {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 600;
}

.nuu3d-timelapse-field {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  font-weight: 600;
}

.nuu3d-timelapse-field input,
.nuu3d-timelapse-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  color: var(--v3-ink);
  background: var(--v3-paper);
  font: inherit;
}

.nuu3d-timelapse-field small,
.nuu3d-timelapse-images small,
.nuu3d-timelapse-summary,
.nuu3d-timelapse-status {
  color: var(--v3-muted);
  font-size: 14px;
  line-height: 1.5;
}

.nuu3d-timelapse-images {
  min-width: 0;
}

.nuu3d-timelapse-images__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.nuu3d-timelapse-images__header h2 {
  margin: 0 0 4px;
  color: inherit;
  font-size: 18px;
}

.nuu3d-timelapse-images__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.nuu3d-timelapse-images__actions button,
.nuu3d-timelapse-images__actions .n3d-v3-button,
.nuu3d-timelapse-cancel {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--v3-line);
  border-radius: 9px;
  color: var(--v3-ink);
  background: var(--v3-paper);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.nuu3d-timelapse-images__actions .n3d-v3-button {
  color: var(--v3-button-text, #fff);
  background: var(--v3-action);
  border-color: var(--v3-action);
}

.nuu3d-timelapse-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.nuu3d-timelapse-empty {
  display: flex;
  min-height: 180px;
  padding: 20px;
  border: 1px dashed color-mix(in srgb, var(--v3-muted) 55%, transparent);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: color-mix(in srgb, var(--v3-surface) 82%, var(--v3-ink) 3%);
  text-align: center;
  cursor: pointer;
}

.nuu3d-timelapse-empty > span {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 2px;
  border-radius: 50%;
  place-items: center;
  color: var(--v3-button-text, #fff);
  background: var(--v3-action);
  font-size: 24px;
}

.nuu3d-timelapse-file-input:focus-visible + .n3d-v3-button {
  outline: 2px solid var(--v3-action);
  outline-offset: 3px;
}

.nuu3d-timelapse-order {
  margin: 0 0 10px;
  color: var(--v3-muted);
  font-size: 12px;
}

.nuu3d-timelapse-gallery {
  display: grid;
  max-height: 430px;
  margin: 0;
  padding: 0 4px 0 0;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
  overflow: auto;
  list-style: none;
  scrollbar-gutter: stable;
}

.nuu3d-timelapse-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: var(--v3-paper);
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 128px 118px;
}

.nuu3d-timelapse-card__preview {
  position: relative;
  aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--v3-surface) 85%, var(--v3-ink) 5%);
}

.nuu3d-timelapse-card__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nuu3d-timelapse-card__number,
.nuu3d-timelapse-card__remove {
  position: absolute;
  top: 6px;
  display: grid;
  min-width: 25px;
  height: 25px;
  padding: 0 5px;
  border: 0;
  border-radius: 20px;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}

.nuu3d-timelapse-card__number {
  left: 6px;
  color: #fff;
  background: rgb(20 25 18 / 82%);
  font-weight: 700;
}

.nuu3d-timelapse-card__remove {
  right: 6px;
  color: #252c20;
  background: #fff;
  box-shadow: 0 1px 7px rgb(0 0 0 / 25%);
  font-size: 20px;
  cursor: pointer;
}

.nuu3d-timelapse-card__name {
  display: block;
  padding: 8px 9px;
  overflow: hidden;
  color: var(--v3-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nuu3d-timelapse-progress {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--v3-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--v3-surface) 88%, var(--v3-action) 5%);
}

.nuu3d-timelapse-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.nuu3d-timelapse-progress > div span {
  color: var(--v3-muted);
  font-variant-numeric: tabular-nums;
}

.nuu3d-timelapse-progress progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: color-mix(in srgb, var(--v3-muted) 20%, transparent);
}

.nuu3d-timelapse-progress progress::-webkit-progress-bar {
  border-radius: 20px;
  background: color-mix(in srgb, var(--v3-muted) 20%, transparent);
}

.nuu3d-timelapse-progress progress::-webkit-progress-value,
.nuu3d-timelapse-progress progress::-moz-progress-bar {
  border-radius: 20px;
  background: var(--v3-action);
}

.nuu3d-timelapse-cancel {
  justify-self: end;
}

.nuu3d-timelapse-panel [data-timelapse-create],
.nuu3d-timelapse-result .n3d-v3-button {
  width: 100%;
  cursor: pointer;
}

.nuu3d-timelapse-panel button:disabled,
.nuu3d-timelapse-panel fieldset:disabled label {
  opacity: .55;
  cursor: not-allowed;
}

.nuu3d-timelapse-status {
  min-height: 24px;
  margin: 18px 0 0;
}

.nuu3d-timelapse-result {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.nuu3d-timelapse-result video {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: #111;
}

.nuu3d-timelapse-result[hidden],
.nuu3d-timelapse-progress[hidden],
.nuu3d-timelapse-gallery[hidden],
.nuu3d-timelapse-empty[hidden],
.nuu3d-timelapse-order[hidden],
.nuu3d-timelapse-images__actions button[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .nuu3d-timelapse-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nuu3d-others-page,
  .nuu3d-timelapse-page {
    padding-bottom: 32px;
  }

  .nuu3d-timelapse-panel {
    padding: 22px;
  }

  .nuu3d-timelapse-images__header {
    align-items: stretch;
    flex-direction: column;
  }

  .nuu3d-timelapse-images__actions > * {
    flex: 1;
    text-align: center;
  }

  .nuu3d-timelapse-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .nuu3d-timelapse-empty,
  .nuu3d-timelapse-images__actions button,
  .nuu3d-timelapse-images__actions .n3d-v3-button,
  .nuu3d-timelapse-card__remove {
    transition: background-color .15s, border-color .15s, color .15s;
  }
}
