:root {
  --ink: #111c26;
  --muted: #6d7b87;
  --line: #d9e2e5;
  --paper: #ffffff;
  --canvas: #eef3f1;
  --blue: #287cff;
  --blue-soft: #eaf2ff;
  --lime: #c5f653;
  --violet: #7657ff;
  --shadow: 0 22px 60px rgba(18, 31, 40, 0.09);
  --shadow-soft: 0 10px 30px rgba(18, 31, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 0%, rgba(197, 246, 83, 0.24), transparent 28rem),
    radial-gradient(circle at 95% 12%, rgba(40, 124, 255, 0.1), transparent 30rem),
    linear-gradient(180deg, #f7faf9 0, var(--canvas) 42rem),
    var(--canvas);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.protocol-warning {
  padding: 10px 18px;
  color: #774d00;
  background: #fff0c7;
  text-align: center;
  font-size: 13px;
}

.protocol-warning a {
  color: #1768c8;
  font-weight: 800;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(40, 124, 255, 0.24);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
  box-shadow: none !important;
}

input,
select {
  color: var(--ink);
}

.app-shell {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero,
.hero > div,
.toolbar,
.toolbar-actions,
.threshold-control,
.threshold-heading,
.legend {
  display: flex;
  align-items: center;
}

.hero {
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 10px 4px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-lockup {
  gap: 16px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  color: #101a24;
  background: linear-gradient(145deg, #d7ff75, var(--lime));
  box-shadow: 0 12px 30px rgba(116, 158, 30, 0.24);
  font-size: 28px;
  font-weight: 900;
}

.brand-mark span {
  position: relative;
  z-index: 1;
}

.brand-mark i {
  position: absolute;
  right: -13px;
  bottom: -13px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(40, 124, 255, 0.18);
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: #7a8791;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.section-kicker::before {
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--lime);
  content: "";
  vertical-align: middle;
}

.spine-panel .section-kicker::before,
.spine-result-section .section-kicker::before {
  background: var(--violet);
}

.output-panel .section-kicker::before {
  background: #2b7aff;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(28px, 3vw, 42px);
}

h2 {
  font-size: 23px;
}

.hero-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.nav-spine-button {
  min-width: 150px;
  justify-content: space-between;
}

.nav-frame-button {
  min-width: 150px;
  justify-content: space-between;
}

.nav-frame-button b {
  color: var(--lime);
  font-size: 18px;
}

.nav-spine-button b {
  color: var(--lime);
  font-size: 18px;
}

.privacy-pill {
  padding: 9px 14px;
  border: 1px solid #d5ddd9;
  border-radius: 999px;
  color: #52605b;
  background: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-weight: 700;
}

.privacy-pill i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #72bd28;
}

.upload-panel,
.progress-panel,
.analysis-card,
.help-card,
.editor-preview,
.clip-controls {
  border: 1px solid rgba(214, 222, 224, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.clip-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
}

.editor-preview,
.clip-controls {
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading h2 {
  line-height: 1.15;
}

.workspace > section,
.standalone-spine-workspace > section {
  scroll-margin-top: 22px;
}

.editor-preview video {
  display: block;
  width: 100%;
  max-height: 520px;
  border-radius: 16px;
  background: #111820;
}

.video-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.video-facts span {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  background: #f0f3f2;
  font-size: 12px;
}

.video-facts strong {
  color: var(--ink);
}

.clip-controls {
  display: flex;
  flex-direction: column;
}

.range-track {
  position: relative;
  height: 36px;
  margin: 34px 0 12px;
}

.range-track::before,
.range-track div {
  position: absolute;
  top: 15px;
  right: 0;
  left: 0;
  height: 7px;
  border-radius: 999px;
}

.range-track::before {
  content: "";
  background: #dfe5e6;
}

.range-track div {
  right: auto;
  background: var(--blue);
}

.range-track input {
  position: absolute;
  width: 100%;
  height: 36px;
  margin: 0;
  pointer-events: none;
  appearance: none;
  background: transparent;
}

.range-track input::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 2px 9px rgba(23, 52, 84, 0.3);
  pointer-events: auto;
  appearance: none;
}

.range-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.range-values label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.range-values input {
  width: 74px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.range-values strong {
  color: var(--blue);
}

.quick-lengths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.quick-lengths button {
  padding: 11px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.quick-lengths button:hover {
  border-color: #91bfff;
  color: #1768c8;
  background: #f3f8ff;
}

.extract-box {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 32px;
}

.extract-box label {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.extract-box input {
  width: 75px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.extract-box small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 500;
}

.button-large {
  height: 50px;
  padding: 0 22px;
}

.upload-panel {
  padding: 20px;
  border-color: rgba(211, 222, 223, 0.92);
  background: rgba(255, 255, 255, 0.88);
}

.home-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 10px 22px;
}

.home-intro h2 {
  margin-top: 7px;
  font-size: clamp(22px, 2.5vw, 34px);
}

.home-intro p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.home-badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  color: #245000;
  background: #e8ffc0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.workflow-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.workflow-pills span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  font-size: 11px;
  font-weight: 700;
}

.workflow-pills b {
  margin-right: 4px;
  color: var(--blue);
}

.drop-zone {
  display: flex;
  width: 100%;
  min-height: 310px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 11px;
  border: 1.5px dashed #afbabf;
  border-radius: 20px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.74)),
    repeating-linear-gradient(45deg, #eef1f0, #eef1f0 8px, #f7f8f7 8px, #f7f8f7 16px);
  cursor: pointer;
  transition: 180ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: #7fb629;
  background-color: #fbfff4;
  box-shadow: inset 0 0 0 4px rgba(197, 246, 83, 0.14);
}

.upload-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 20px;
  background: var(--lime);
}

.upload-icon svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.drop-zone strong {
  margin-top: 8px;
  font-size: 20px;
}

.drop-zone > span:last-child,
.extract-settings p {
  color: var(--muted);
  font-size: 13px;
}

.extract-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 8px 2px;
}

.extract-settings label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
}

.extract-settings input {
  width: 68px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
}

.progress-panel {
  padding: 30px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e7e4;
}

.progress-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9bdb3c, var(--lime));
  transition: width 120ms linear;
}

.workspace {
  display: block;
}

.toolbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

#selectionCount {
  color: #7a8690;
  font-size: 16px;
  font-weight: 600;
}

.toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  display: inline-flex;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.button-secondary {
  border-color: var(--line);
  background: white;
}

.button-accent {
  border-color: #bfd9f8;
  color: #1768c8;
  background: #f3f8ff;
}

.button-primary {
  color: #14200b;
  background: var(--lime);
  box-shadow: 0 8px 20px rgba(124, 162, 50, 0.19);
}

.button-dark {
  color: white;
  background: linear-gradient(135deg, #111c26, #263746);
}

.spine-panel {
  background:
    linear-gradient(180deg, rgba(118, 87, 255, 0.045), transparent 180px),
    rgba(255, 255, 255, 0.9);
}

.spine-panel > .panel-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.animation-group {
  box-shadow: var(--shadow-soft);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding: 22px 6px 0;
  border-top: 1px solid rgba(151, 166, 169, 0.28);
  color: var(--muted);
  font-size: 11px;
}

.site-footer div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.site-footer strong {
  color: var(--ink);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.analysis-card {
  overflow: hidden;
  margin-bottom: 16px;
}

.threshold-control {
  gap: 20px;
  padding: 18px 20px;
}

.threshold-heading {
  min-width: 220px;
  gap: 11px;
}

.threshold-heading div {
  display: flex;
  flex-direction: column;
}

.threshold-heading span:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.search-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 25px;
  font-weight: 800;
}

.threshold-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9f8;
}

.threshold-input input {
  width: 58px;
  padding: 9px 4px 9px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: right;
  font-weight: 900;
}

.threshold-input span {
  padding-right: 9px;
  color: var(--muted);
  font-weight: 700;
}

#thresholdRange {
  min-width: 160px;
  flex: 1;
  accent-color: var(--blue);
}

.analysis-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-top: 1px solid #e8edee;
  color: #63707a;
  background: #f8faf9;
  font-size: 12px;
}

.summary-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.legend {
  justify-content: flex-end;
  gap: 18px;
  margin: 13px 2px;
  color: #707c86;
  font-size: 12px;
}

.legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.selection-tip {
  margin: 12px 0 16px;
  padding: 11px 14px;
  border: 1px solid #c9ddfb;
  border-radius: 10px;
  color: #3970b5;
  background: #edf5ff;
  font-size: 12px;
}

kbd {
  padding: 2px 6px;
  border: 1px solid #aebed4;
  border-radius: 5px;
  background: white;
  box-shadow: 0 1px 0 #aebed4;
  font-size: 11px;
}

.legend-box,
.legend-check {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 4px;
}

.legend-box.similar {
  border: 2px solid var(--blue);
  background: var(--blue-soft);
}

.legend-star {
  color: #e2a400;
}

.legend-check {
  color: white;
  background: #18232d;
  font-size: 9px;
}

.frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 13px;
}

.collapsible-gallery {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid rgba(198, 211, 216, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.gallery-toggle {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid rgba(214, 222, 224, 0.9);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  text-align: left;
}

.gallery-toggle span {
  font-weight: 900;
}

.gallery-toggle small {
  color: var(--muted);
  font-size: 12px;
}

.gallery-toggle b {
  padding: 5px 9px;
  border-radius: 999px;
  color: #174069;
  background: var(--blue-soft);
  font-size: 11px;
}

.gallery-body {
  max-height: 64vh;
  overflow: auto;
  padding: 14px;
  transition: max-height 180ms ease;
}

.collapsible-gallery.is-collapsed .gallery-body {
  max-height: 260px;
}

.collapsible-gallery.is-closed .gallery-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.collapsible-gallery.is-collapsed .gallery-body::after {
  position: sticky;
  bottom: -14px;
  display: block;
  height: 38px;
  margin: 0 -14px -14px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.92));
  content: "";
  pointer-events: none;
}

.frame-card {
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 14px;
  background: white;
  box-shadow: 0 4px 18px rgba(27, 41, 50, 0.06);
  cursor: pointer;
  transition: 150ms ease;
  user-select: none;
}

.frame-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(27, 41, 50, 0.12);
}

.frame-card.similar {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(43, 127, 255, 0.11);
}

.frame-card:not(.selected) img {
  filter: grayscale(0.48);
  opacity: 0.64;
}

.frame-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dce1e1;
}

.frame-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  font-size: 11px;
}

.frame-meta strong {
  font-size: 12px;
}

.frame-time {
  color: var(--muted);
}

.frame-check,
.keyframe-star,
.group-index {
  position: absolute;
  display: grid;
  place-items: center;
  z-index: 2;
}

.frame-player,
.keyer-panel,
.processed-section,
.output-panel,
.spine-panel,
.spine-result-section {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(214, 222, 224, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.animation-groups {
  display: grid;
  gap: 14px;
}

.animation-group {
  padding: 16px;
  border: 1px solid #d9e1e5;
  border-radius: 14px;
  background: #f9fbfb;
}

.animation-group-header,
.animation-group-fields,
.spine-export-bar,
.spine-preview-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.animation-group-header {
  justify-content: space-between;
  margin-bottom: 12px;
}

.animation-group-header h3 {
  margin: 0;
  font-size: 16px;
}

.animation-group-fields label,
.spine-export-bar label,
.spine-preview-toolbar label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.animation-group-fields input,
.spine-export-bar input,
.animation-group-fields select,
.spine-export-bar select,
.spine-preview-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.group-frame-strip {
  display: grid;
  max-height: 300px;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  overflow: auto;
  border-radius: 10px;
  background: #edf1f2;
}

.group-frame-strip img {
  width: 70px;
  height: 70px;
  border: 1px solid #c8d0d3;
  border-radius: 7px;
  object-fit: contain;
  background: white;
}

.group-empty {
  display: flex;
  min-height: 110px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px dashed #c7d7df;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
}

.spine-export-bar {
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.spine-version-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #d8ccff;
  border-radius: 10px;
  color: #65558b;
  background: #f7f4ff;
  font-size: 12px;
}

.spine-version-hint strong {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 7px;
  color: white;
  background: var(--violet);
}

.spine-version-guide {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.spine-version-guide summary {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.spine-version-guide summary::-webkit-details-marker {
  display: none;
}

.spine-version-guide[open] summary span {
  transform: rotate(45deg);
}

.spine-version-guide > div {
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.spine-version-guide p {
  margin: 7px 0;
}

.version-warning {
  padding: 9px 10px;
  border-radius: 8px;
  color: #7d5200;
  background: #fff3d5;
}

.atlas-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #d9e1e5;
  border-radius: 10px;
  background: #f7f9f9;
  font-size: 12px;
}

.atlas-options label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.atlas-options input[type="number"],
.atlas-options select {
  width: 82px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.group-upload-zone {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed #a9b9c2;
  border-radius: 10px;
  color: var(--muted);
  background: white;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
}

.group-upload-zone.dragging {
  border-color: var(--blue);
  background: #eef5ff;
}

.group-file-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.group-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: white;
  font-size: 11px;
}

.group-frame-item {
  position: relative;
  display: grid;
  place-items: center;
  cursor: grab;
}

.group-frame-item.dragging {
  opacity: 0.35;
}

.group-frame-item.current img {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.18);
}

.group-frame-item button {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 2;
  width: 19px;
  height: 19px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: #db4545;
  cursor: pointer;
}

.group-preview-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.group-current-preview {
  display: grid;
  min-height: 220px;
  margin-top: 10px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.group-current-preview img {
  display: block;
  max-width: 100%;
  max-height: 360px;
}

.group-preview-controls input[type="range"] {
  flex: 1;
}

.event-editor {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e5d8f8;
  border-radius: 10px;
  background: #fbf8ff;
}

.event-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.event-editor-heading > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-editor-heading strong {
  font-size: 12px;
}

.event-editor-heading span {
  color: var(--muted);
  font-size: 11px;
}

.event-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr auto;
  gap: 7px;
  margin-top: 7px;
}

.event-row input {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.preview-tabs {
  display: flex;
  background: white;
}

.preview-tabs button {
  flex: 1;
  padding: 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: white;
  cursor: pointer;
}

.preview-tabs button.active {
  border-color: var(--blue);
  color: var(--blue);
}

.atlas-preview-container {
  padding: 12px;
  background: #20232c;
}

.atlas-preview-container img {
  display: block;
  max-width: 100%;
  margin: 0 auto 12px;
  background: white;
}

.compatibility-dialog {
  width: min(90vw, 720px);
  border: 0;
  border-radius: 16px;
}

.compatibility-dialog > button {
  float: right;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
}
.spine-standalone-upload {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px dashed #a9b9c2;
  border-radius: 12px;
  background: #f5f8f8;
  color: var(--muted);
  font-size: 12px;
  transition: 160ms ease;
}

.spine-standalone-upload.dragging {
  border-color: var(--blue);
  color: #1768c8;
  background: #eef5ff;
  box-shadow: inset 0 0 0 2px rgba(43, 127, 255, 0.1);
}

.spine-standalone-upload > div:nth-child(3) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.spine-standalone-upload strong {
  color: var(--ink);
  font-size: 14px;
}

.spine-upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #1768c8;
  background: #dceaff;
  font-size: 28px;
  line-height: 1;
}

.standalone-spine-workspace {
  margin-top: 4px;
}

.spine-result-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(400px, 1.3fr);
  gap: 18px;
}

.spine-file-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.spine-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-size: 12px;
}

.spine-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #161922;
}

.spine-preview-toolbar {
  padding: 10px;
  background: white;
}

.spine-preview canvas {
  display: block;
  width: 100%;
  min-height: 420px;
}

.processed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.processed-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #aeb8bd;
  border-radius: 10px;
  background: white;
  cursor: zoom-in;
}

.processed-card:not(.selected) {
  opacity: 0.42;
  filter: grayscale(0.55);
}

.processed-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(43, 127, 255, 0.12);
}

.processed-select {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid white;
  border-radius: 7px;
  color: transparent;
  background: rgba(18, 27, 36, 0.55);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.processed-card.selected .processed-select {
  color: white;
  background: var(--blue);
}

.processed-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.history-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.history-bar select {
  min-width: 230px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.button-danger {
  border-color: #efc8c8;
  color: #a83232;
  background: #fff5f5;
}

.processed-card .checkerboard {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
}

.processed-card img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.processed-card span {
  display: block;
  padding: 7px;
  text-align: center;
  font-size: 11px;
}

.output-panel {
  border-color: rgba(43, 122, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(43, 122, 255, 0.06), transparent 190px),
    #f8fbff;
}

.output-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.output-card {
  padding: 16px;
  border: 1px solid rgba(43, 122, 255, 0.18);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
}

.output-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.output-card h3:not(:first-child) {
  margin-top: 20px;
}

.dimension-inputs,
.layout-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
}

.layout-inputs {
  grid-template-columns: 1fr 1fr;
}

.dimension-inputs label,
.layout-inputs label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dimension-inputs input,
.layout-inputs input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.aspect-lock {
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: white;
  cursor: pointer;
  font-size: 11px;
}

.aspect-lock.active {
  border-color: rgba(43, 122, 255, 0.5);
  color: #0f4fb8;
  background: rgba(43, 122, 255, 0.1);
}

.output-card p {
  color: var(--muted);
  font-size: 11px;
}

.output-status-tip {
  padding: 9px 10px;
  border-radius: 8px;
  color: #1d5dc8 !important;
  background: rgba(43, 122, 255, 0.1);
}

.quality-options {
  display: grid;
  gap: 7px;
}

.quality-options label {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 12px;
}

.quality-options label small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 400;
}

.pica-status,
.quality-report {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 11px;
}

.pica-status {
  color: #15613b;
  background: #e8f8ef;
}

.pica-status.error {
  color: #9b3131;
  background: #fff0f0;
}

.quality-report {
  color: #1d5dc8;
  background: rgba(43, 122, 255, 0.09);
}

.size-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.size-presets button {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  color: #0f2338;
  background: linear-gradient(135deg, #bcfc54, #79df4b);
  cursor: pointer;
  font-weight: 800;
}

.button-wide {
  width: 100%;
  margin-top: 8px;
}

.image-dialog {
  width: min(92vw, 900px);
  padding: 18px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(16, 26, 36, 0.34);
}

.image-dialog::backdrop {
  background: rgba(10, 18, 26, 0.72);
}

.image-dialog > button {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(17, 24, 32, 0.8);
  cursor: pointer;
  font-size: 24px;
}

.image-dialog > div {
  display: grid;
  max-height: 75vh;
  place-items: center;
  overflow: auto;
  border-radius: 10px;
}

.image-dialog img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
}

.image-dialog p {
  margin: 12px 0 0;
  text-align: center;
}

.panel-description {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.checkerboard {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #d7dcdd 25%, transparent 25%),
    linear-gradient(-45deg, #d7dcdd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d7dcdd 75%),
    linear-gradient(-45deg, transparent 75%, #d7dcdd 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.player-stage {
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.player-stage img,
.player-stage canvas {
  display: block;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.preview-range {
  width: 100%;
  margin: 16px 0 10px;
  accent-color: var(--blue);
}

.player-controls,
.keyer-actions,
.key-color-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.speed-control,
.loop-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.speed-control select {
  padding: 7px 28px 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.keyer-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.keyer-preview-grid > div {
  min-width: 0;
}

.preview-label {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.key-preview-canvas,
.preview-canvas-wrap {
  border: 1px solid #aeb8bd;
  border-radius: 12px;
}

.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(280px, 34vh, 420px);
  overflow: hidden;
  border: 1px solid #aeb8bd;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.key-preview-canvas {
  display: block;
  border: 0;
  background: transparent;
}

.preview-canvas-wrap {
  min-height: 0;
}

.preview-canvas-wrap canvas {
  border: 0;
}

.color-picker-canvas {
  cursor: crosshair;
}

.crop-stage {
  position: relative;
  margin: 0 auto;
  line-height: 0;
}

.crop-stage.cropping {
  cursor: crosshair;
  touch-action: none;
}

.crop-overlay {
  position: absolute;
  z-index: 3;
  border: 3px solid #ff647f;
  border-radius: 3px;
  background: rgba(255, 100, 127, 0.05);
  box-shadow: 0 0 0 9999px rgba(14, 22, 30, 0.38);
  cursor: move;
  pointer-events: auto;
}

.watermark-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.watermark-box {
  position: absolute;
  border: 2px dashed #ff9f1a;
  border-radius: 4px;
  background: rgba(255, 159, 26, 0.12);
  box-shadow: 0 0 0 9999px rgba(255, 159, 26, 0.04);
  cursor: move;
  pointer-events: auto;
}

.watermark-box.active {
  border-style: solid;
  background: rgba(255, 159, 26, 0.2);
}

.watermark-box span {
  position: absolute;
  top: -20px;
  left: -2px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #412600;
  background: #ffd37a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.watermark-box i {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #ff9f1a;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(22, 31, 40, 0.24);
}

.watermark-box .nw { top: -7px; left: -7px; cursor: nwse-resize; }
.watermark-box .n { top: -7px; left: calc(50% - 5px); cursor: ns-resize; }
.watermark-box .ne { top: -7px; right: -7px; cursor: nesw-resize; }
.watermark-box .e { top: calc(50% - 5px); right: -7px; cursor: ew-resize; }
.watermark-box .se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.watermark-box .s { bottom: -7px; left: calc(50% - 5px); cursor: ns-resize; }
.watermark-box .sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.watermark-box .w { top: calc(50% - 5px); left: -7px; cursor: ew-resize; }

.crop-handle {
  position: absolute;
  z-index: 4;
  width: 13px;
  height: 13px;
  border: 2px solid #ff647f;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 5px rgba(22, 31, 40, 0.3);
}

.crop-handle.nw { top: -8px; left: -8px; cursor: nwse-resize; }
.crop-handle.n { top: -8px; left: calc(50% - 6px); cursor: ns-resize; }
.crop-handle.ne { top: -8px; right: -8px; cursor: nesw-resize; }
.crop-handle.e { top: calc(50% - 6px); right: -8px; cursor: ew-resize; }
.crop-handle.se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.crop-handle.s { bottom: -8px; left: calc(50% - 6px); cursor: ns-resize; }
.crop-handle.sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
.crop-handle.w { top: calc(50% - 6px); left: -8px; cursor: ew-resize; }

.crop-overlay::before,
.crop-overlay::after {
  position: absolute;
  content: "";
  background: rgba(255, 255, 255, 0.65);
}

.crop-overlay::before {
  top: 33.33%;
  right: 0;
  left: 0;
  height: 1px;
  box-shadow: 0 calc(var(--crop-height, 100px) / 3) 0 rgba(255, 255, 255, 0.65);
}

.crop-overlay::after {
  top: 0;
  bottom: 0;
  left: 33.33%;
  width: 1px;
  box-shadow: calc(var(--crop-width, 100px) / 3) 0 0 rgba(255, 255, 255, 0.65);
}

.crop-size-label {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 4px 6px;
  border-radius: 5px;
  color: white;
  background: rgba(18, 25, 34, 0.82);
  font-size: 10px;
  line-height: 1;
}

.keyer-control-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(43, 122, 255, 0.26);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(43, 122, 255, 0.08), rgba(188, 252, 84, 0.08)),
    rgba(246, 250, 255, 0.94);
  box-shadow: 0 16px 36px rgba(27, 92, 180, 0.08);
}

.crop-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(43, 122, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.watermark-controls {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(255, 159, 26, 0.28);
  border-radius: 14px;
  background: rgba(255, 251, 242, 0.82);
}

.watermark-main-row,
.watermark-settings-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.watermark-controls .setting-check {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  color: #835000;
  background: rgba(255, 159, 26, 0.12);
}

.watermark-settings-row label {
  display: flex;
  min-width: 190px;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  color: #4c5f7a;
  font-size: 12px;
  font-weight: 800;
}

.watermark-settings-row select,
.watermark-settings-row input {
  width: 100%;
}

.watermark-settings-row input {
  accent-color: #ff9f1a;
}

.watermark-settings-row output,
#watermarkInfo {
  color: #985f00;
  font-weight: 900;
}

.watermark-controls > small {
  color: #6d7f95;
  font-size: 11px;
}

.crop-controls .setting-check {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(43, 122, 255, 0.08);
  color: #124aa2;
}

#cropInfo {
  color: #1d5dc8;
  font-size: 11px;
  font-weight: 700;
}

.key-color-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(43, 122, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.keyer-tool-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.tool-menu-button.active {
  border-color: rgba(43, 122, 255, 0.55);
  color: #0f4fb8;
  background: rgba(43, 122, 255, 0.12);
  box-shadow: 0 8px 18px rgba(43, 122, 255, 0.12);
}

.tool-menu-panel {
  animation: menuDrop 150ms ease;
}

@keyframes menuDrop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.color-picker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}

.color-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#keyColorSwatch {
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 8px;
  background: #5faf5c;
  box-shadow: 0 0 0 1px #cbd3d5;
  cursor: pointer;
}

.keyer-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  padding: 14px;
  border: 1px solid rgba(43, 122, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.keyer-settings.is-basic label:has(#alphaCutoffRange),
.keyer-settings.is-basic label:has(#preserveShadowInput),
.keyer-settings.is-basic label:has(#edgeRange),
.keyer-settings.is-basic label:has(#noiseRange),
.keyer-settings.is-basic label:has(#sharpenRange),
.keyer-settings.is-basic .keyer-section-title:nth-of-type(3),
.keyer-control-panel.is-basic .keyer-smooth-check {
  display: none;
}

.keyer-advanced-toggle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px dashed rgba(43, 122, 255, 0.26);
  border-radius: 13px;
  color: #5d718f;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.keyer-advanced-toggle-row span {
  flex: 1;
  min-width: 220px;
}

.keyer-section-title {
  grid-column: 1 / -1;
  margin: 2px 0 -2px;
  padding: 9px 12px;
  border: 1px solid rgba(43, 122, 255, 0.18);
  border-radius: 12px;
  color: #124aa2;
  background: linear-gradient(135deg, rgba(43, 122, 255, 0.12), rgba(188, 252, 84, 0.12));
  font-size: 14px;
  letter-spacing: 0.02em;
}

.keyer-settings label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.keyer-settings input {
  width: 100%;
  accent-color: #2b7aff;
}

.keyer-settings output {
  color: #1d5dc8;
}

.keyer-settings small {
  color: var(--muted);
  font-weight: 400;
}

.keyer-settings .keyer-check {
  min-height: 58px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 1px dashed rgba(43, 122, 255, 0.32);
  border-radius: 12px;
  color: #124aa2;
  background: rgba(255, 255, 255, 0.62);
}

.keyer-smooth-check {
  width: fit-content;
  margin: 12px 0 0;
  padding: 10px 14px;
}

.setting-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
}

.frame-check {
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 7px;
  color: transparent;
  background: rgba(24, 35, 45, 0.38);
  backdrop-filter: blur(5px);
  font-size: 13px;
  font-weight: 900;
}

.selected .frame-check {
  color: white;
  background: var(--ink);
}

.keyframe-star {
  top: 8px;
  left: 8px;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #8a6200;
  background: #ffe38b;
  box-shadow: 0 3px 12px rgba(80, 55, 0, 0.24);
}

.group-index {
  right: 7px;
  bottom: 39px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.help-card {
  margin-top: 24px;
  box-shadow: none;
}

.help-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  list-style: none;
}

.help-card summary::-webkit-details-marker {
  display: none;
}

.help-card[open] summary span {
  transform: rotate(45deg);
}

.help-content {
  padding: 0 20px 18px;
  color: #65717b;
  font-size: 13px;
  line-height: 1.75;
}

.threshold-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.threshold-guide span {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2f5f4;
}

.threshold-guide b {
  color: var(--ink);
}

.new-video-button {
  display: block;
  margin: 22px auto 0;
  border: 0;
  color: #6c7880;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 24px, 1500px);
    padding-top: 24px;
  }

  .privacy-pill,
  .hero-copy {
    display: none;
  }

  .hero-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .home-intro,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-pills {
    justify-content: flex-start;
  }

  .toolbar,
  .extract-settings {
    align-items: flex-start;
    flex-direction: column;
  }

  .clip-editor {
    grid-template-columns: 1fr;
  }

  .keyer-preview-grid,
  .keyer-settings,
  .output-layout,
  .spine-result-layout {
    grid-template-columns: 1fr;
  }

  .keyer-control-panel {
    padding: 12px;
  }

  .key-color-row,
  .crop-controls,
  .watermark-main-row,
  .watermark-settings-row {
    align-items: stretch;
    flex-direction: column;
  }

  .extract-box {
    margin-top: 0;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .threshold-control {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .threshold-heading {
    width: 100%;
  }

  #thresholdRange {
    order: 3;
    width: 100%;
  }

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

@media (max-width: 460px) {
  h1 {
    font-size: 23px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 22px;
  }

  .hero {
    align-items: flex-start;
  }

  .nav-spine-button {
    min-width: auto;
  }

  .drop-zone {
    min-height: 260px;
  }

  .button {
    flex: 1;
  }

  .button-primary {
    flex-basis: 100%;
  }
}
