:root {
  --rs-editor-bg: #070b14;
  --rs-editor-panel: #0d1421;
  --rs-editor-panel-deep: #09101b;
  --rs-editor-border: rgba(148, 163, 184, 0.18);
  --rs-editor-border-soft: rgba(148, 163, 184, 0.11);
  --rs-editor-text: #f7f8fb;
  --rs-editor-muted: #9ba5b7;
  --rs-editor-blue: #3f7cff;
  --rs-editor-violet: #7c3ff2;
  --rs-editor-edited-accent: #50d890;
  --rs-editor-edited-accent-rgb: 80, 216, 144;
  --rs-editor-original-text: #f1f3f7;
  --rs-editor-metadata-gap: 12px;
  --rs-editor-radius: 15px;
  --rs-editor-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.rs-editor-shell {
  min-height: 100vh;
}

.rs-editor-workzone {
  min-height: 0;
}

.rs-editor-work-container {
  width: 100%;
  max-width: none;
}

.rs-editor {
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  gap: 24px;
  width: min(100%, 1720px);
  min-width: 0;
  color: var(--rs-editor-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rs-editor button,
.rs-editor a {
  font: inherit;
}

.rs-editor [hidden] {
  display: none !important;
}

.rs-editor[data-tool-ready="false"] .rs-editor-tool-settings,
.rs-editor[data-tool-ready="false"] .rs-editor-command-bar {
  visibility: hidden;
}

.rs-editor[data-tool-ready="false"] .rs-editor-tool.is-active {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: #aeb8ca;
}

.rs-editor button:disabled {
  cursor: default;
  opacity: 1;
}

.rs-editor-panel,
.rs-editor-filebar,
.rs-editor-canvas,
.rs-editor-metadata {
  border: 1px solid var(--rs-editor-border);
  background: linear-gradient(180deg, rgba(15, 22, 36, 0.98), rgba(8, 14, 24, 0.98));
  box-shadow: var(--rs-editor-shadow);
}

.rs-editor-panel {
  display: flex;
  height: 795px;
  min-height: 795px;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
}

.rs-editor-tools {
  display: grid;
  gap: 3px;
  padding: 7px;
  border-bottom: 1px solid var(--rs-editor-border-soft);
}

.rs-editor-tool {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  gap: 13px;
  padding: 0 42px 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #dfe4ee;
  font-size: 14px;
  text-align: left;
}

.rs-editor-tool-edit-dot {
  position: absolute;
  top: 50%;
  right: 24px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rs-editor-edited-accent);
  box-shadow: 0 0 0 2px rgba(var(--rs-editor-edited-accent-rgb), 0.1), 0 0 7px rgba(var(--rs-editor-edited-accent-rgb), 0.32);
  opacity: 0;
  transform: translateY(-50%) scale(0.72);
  transition: opacity 140ms ease, transform 140ms ease;
  pointer-events: none;
}

.rs-editor-tool.has-edit .rs-editor-tool-edit-dot {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.rs-editor-tool:not(:disabled) {
  cursor: pointer;
}

.rs-editor-tool.is-active {
  border-color: rgba(92, 125, 255, 0.76);
  background: linear-gradient(90deg, rgba(67, 91, 170, 0.38), rgba(56, 55, 115, 0.28));
  box-shadow: inset 0 0 22px rgba(71, 105, 231, 0.12), 0 0 15px rgba(55, 91, 214, 0.12);
}

.rs-editor-tool-icon,
.rs-editor-file-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  color: #d6dce8;
}

.rs-editor-tool.is-active .rs-editor-tool-icon,
.rs-editor-file-icon {
  color: #78a0ff;
}

.rs-editor svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rs-editor-tool-settings {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 17px 16px 13px;
  border-bottom: 0;
}

.rs-editor-tool-settings h2,
.rs-editor-tool-settings p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.rs-rotate-current,
.rs-rotate-preview,
.rs-quality-current {
  margin-top: 8px !important;
  color: var(--rs-editor-muted);
  font-size: 11px !important;
  font-weight: 400 !important;
}

.rs-rotate-current strong,
.rs-rotate-preview strong,
.rs-quality-current strong {
  margin-left: 5px;
  color: #dfe5f1;
  font-weight: 500;
}

.rs-crop-field {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-crop-field select,
.rs-crop-dimensions input,
.rs-resize-dimensions input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: rgba(7, 12, 22, 0.9);
  color: #dfe5f1;
  font: inherit;
}

.rs-crop-field select {
  padding: 0 30px 0 10px;
}

.rs-crop-preset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 7px;
}

.rs-crop-orientations {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.rs-crop-orientations button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: rgba(7, 12, 22, 0.9);
  color: #aeb8ca;
}

.rs-crop-orientations button:not(:disabled) {
  cursor: pointer;
}

.rs-crop-orientations button:not(:disabled):hover {
  border-color: rgba(99, 132, 255, 0.66);
}

.rs-crop-orientations button:disabled {
  border-color: rgba(148, 163, 184, 0.1);
  background: rgba(7, 12, 22, 0.42);
  color: rgba(174, 184, 202, 0.34);
  box-shadow: none;
}

.rs-crop-orientations button.is-active {
  border-color: rgba(99, 132, 255, 0.76);
  background: rgba(65, 91, 190, 0.3);
}

.rs-orientation-shape {
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 1px;
}

.rs-orientation-shape--landscape {
  width: 16px;
  height: 10px;
}

.rs-orientation-shape--portrait {
  width: 10px;
  height: 16px;
}

.rs-crop-dimensions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
}

.rs-resize-dimensions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto 34px;
  align-items: end;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}

.rs-crop-dimensions legend,
.rs-resize-dimensions legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.rs-crop-dimensions label,
.rs-resize-dimensions label {
  display: grid;
  gap: 4px;
  color: var(--rs-editor-muted);
  font-size: 11px;
}

.rs-resize-dimensions label {
  gap: 6px;
  font-size: 12px;
}

.rs-crop-dimensions input,
.rs-resize-dimensions input {
  padding: 0 8px;
  appearance: textfield;
}

.rs-crop-dimensions > span,
.rs-crop-dimensions small,
.rs-resize-dimensions > span,
.rs-resize-dimensions small {
  padding-bottom: 8px;
  color: #7f8a9c;
  font-size: 11px;
}

.rs-crop-settings .rs-crop-message {
  min-height: 14px;
  margin-top: 5px;
  color: #8e9ab0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
}

.rs-crop-settings .rs-crop-message:not(.is-error) {
  display: none;
}

.rs-resize-settings .rs-resize-message {
  min-height: 26px;
  margin-top: 8px;
  color: #8e9ab0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
}

.rs-resize-settings .rs-resize-message.is-error {
  color: #ffafb5;
}

.rs-crop-settings .rs-crop-message.is-error {
  color: #ffafb5;
}

.rs-editor-command-bar button,
.rs-rotate-directions button,
.rs-flip-directions button,
.rs-quality-mode button {
  min-height: 35px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  background: rgba(10, 16, 28, 0.72);
  color: #aeb8ca;
  font-size: 12px;
}

.rs-resize-scale-row {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-resize-scale-field {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  background: rgba(8, 13, 23, 0.82);
}

.rs-resize-scale-field:focus-within {
  border-color: rgba(84, 120, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(84, 120, 255, 0.14);
}

.rs-resize-scale-field input {
  width: 100%;
  min-width: 0;
  height: 33px;
  padding: 0 4px 0 9px;
  border: 0;
  outline: 0;
  appearance: textfield;
  background: transparent;
  color: #f2f5fa;
  font: inherit;
}

.rs-resize-scale-field span {
  padding-right: 9px;
  color: #7f8a9c;
  font-size: 11px;
}

.rs-resize-dimensions input[aria-invalid="true"],
.rs-resize-scale-field:has(input[aria-invalid="true"]) {
  border-color: rgba(255, 104, 116, 0.84);
  box-shadow: 0 0 0 2px rgba(255, 104, 116, 0.12);
}

.rs-crop-toggle {
  display: inline-flex;
  width: 36px;
  height: 20px;
  align-items: center;
  padding: 2px;
  border: 1px solid rgba(107, 130, 255, 0.54);
  border-radius: 999px;
  background: linear-gradient(90deg, #3675ff, #7b42f3);
  cursor: pointer;
}

.rs-crop-toggle span {
  width: 14px;
  height: 14px;
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.65);
}

.rs-crop-toggle:not(.is-on) {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(8, 13, 23, 0.9);
}

.rs-crop-toggle:not(.is-on) span {
  margin-right: auto;
  margin-left: 0;
  background: #8b95a7;
  box-shadow: none;
}

.rs-viewer-toggle:focus-visible {
  outline: 2px solid #84a4ff;
  outline-offset: 2px;
}

.rs-resize-link-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: rgba(7, 12, 22, 0.9);
  color: #7f8a9c;
}

.rs-resize-link-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rs-resize-link-button.is-on {
  border-color: rgba(99, 132, 255, 0.72);
  background: rgba(65, 91, 190, 0.3);
  color: #b9c9ff;
}

.rs-resize-link-button:not(:disabled) {
  cursor: pointer;
}

.rs-resize-link-button:disabled {
  border-color: rgba(148, 163, 184, 0.1);
  background: rgba(7, 12, 22, 0.42);
  color: rgba(174, 184, 202, 0.34);
}

.rs-crop-settings select:focus-visible,
.rs-crop-settings input:focus-visible,
.rs-crop-settings button:focus-visible,
.rs-resize-settings input:focus-visible,
.rs-resize-settings button:focus-visible,
.rs-rotate-settings input:focus-visible,
.rs-rotate-settings button:focus-visible,
.rs-flip-settings button:focus-visible,
.rs-format-settings select:focus-visible,
.rs-format-settings button:focus-visible,
.rs-quality-settings input:focus-visible,
.rs-quality-settings button:focus-visible,
.rs-crop-frame:focus-visible {
  outline: 2px solid #84a4ff;
  outline-offset: 2px;
}

.rs-editor-command-bar button:not(:disabled),
.rs-rotate-directions button:not(:disabled),
.rs-flip-directions button:not(:disabled),
.rs-quality-mode button:not(:disabled) {
  cursor: pointer;
}

.rs-editor-command-bar .is-emphasis:not(:disabled) {
  background: linear-gradient(110deg, rgba(52, 123, 255, 0.8), rgba(109, 55, 239, 0.8));
  color: #fff;
}

.rs-rotate-directions,
.rs-flip-directions,
.rs-editor-command-bar .is-emphasis {
  border-color: rgba(130, 79, 245, 0.72);
  color: #a9bfff;
}

[data-tool-apply]:disabled {
  border-color: rgba(130, 79, 245, 0.38);
  background: linear-gradient(180deg, rgba(67, 55, 125, 0.3), rgba(38, 34, 77, 0.34));
  box-shadow: inset 0 1px 0 rgba(201, 193, 255, 0.05);
  color: #8497c7;
}

.rs-straighten-control-group {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.rs-straighten-control-label {
  color: var(--rs-editor-muted);
  font-size: 12px;
  font-weight: 400;
}

.rs-straighten-angle-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 10px;
}

.rs-straighten-slider-wrap {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.rs-straighten-slider-wrap input {
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  background:
    repeating-linear-gradient(90deg, rgba(126, 143, 174, 0.24) 0 1px, transparent 1px 18px) center / calc(100% - 10px) 7px no-repeat,
    linear-gradient(90deg, rgba(51, 120, 255, 0.88), rgba(109, 67, 244, 0.88)) center / 50% 2px no-repeat,
    linear-gradient(rgba(101, 117, 146, 0.42), rgba(101, 117, 146, 0.42)) center / 100% 2px no-repeat;
  cursor: pointer;
}

.rs-straighten-slider-wrap input::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #9bb6ff;
  border-radius: 50%;
  appearance: none;
  background: #527cff;
  box-shadow: 0 0 0 3px rgba(82, 124, 255, 0.13), 0 3px 8px rgba(0, 0, 0, 0.34);
}

.rs-straighten-slider-wrap input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 2px solid #9bb6ff;
  border-radius: 50%;
  background: #527cff;
  box-shadow: 0 0 0 3px rgba(82, 124, 255, 0.13), 0 3px 8px rgba(0, 0, 0, 0.34);
}

.rs-straighten-slider-wrap input:disabled {
  cursor: default;
  opacity: 0.42;
}

.rs-straighten-zero-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 12px;
  background: rgba(213, 222, 240, 0.5);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.rs-straighten-value {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: rgba(7, 12, 22, 0.9);
  color: #eef2fa;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rs-straighten-value input {
  width: 52px;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  appearance: textfield;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rs-straighten-value input::-webkit-inner-spin-button,
.rs-straighten-value input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.rs-straighten-value:focus-within {
  border-color: rgba(112, 144, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(82, 124, 255, 0.14);
}

.rs-straighten-value:has(input[aria-invalid="true"]) {
  border-color: rgba(255, 104, 116, 0.84);
}

.rs-auto-straighten {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 209, 102, 0.78) !important;
  border-radius: 7px;
  background: #c94f5d !important;
  color: #fff8df !important;
  box-shadow: none;
}

.rs-auto-straighten svg {
  width: 17px;
  height: 17px;
  color: #ffd166;
}

.rs-auto-straighten:disabled {
  cursor: default;
  opacity: 1;
}

.rs-auto-straighten.is-analyzing svg {
  animation: rs-auto-straighten-analysis 850ms ease-in-out infinite alternate;
}

@keyframes rs-auto-straighten-analysis {
  from { opacity: 0.42; transform: scale(0.86); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .rs-auto-straighten.is-analyzing svg { animation: none; }
}

.rs-rotate-directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.rs-rotate-directions button {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  color: #d7deea;
}

.rs-rotate-directions button:not(:disabled):hover {
  border-color: rgba(99, 132, 255, 0.66);
  background: rgba(65, 91, 190, 0.2);
  color: #fff;
}

.rs-rotate-directions button:not(:disabled):active {
  transform: translateY(1px) scale(0.985);
}

.rs-rotate-directions svg {
  width: 16px;
  height: 16px;
}

.rs-editor-control-group {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.rs-editor-control-label {
  color: var(--rs-editor-muted);
  font-size: 12px;
  font-weight: 400;
}

.rs-flip-directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.rs-flip-directions button {
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  color: #d7deea;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 90ms ease;
}

.rs-flip-button-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  color: #89a9ff;
}

.rs-flip-directions button:not(:disabled):hover {
  border-color: rgba(99, 132, 255, 0.68);
  background: rgba(65, 91, 190, 0.2);
  box-shadow: 0 7px 16px rgba(22, 34, 82, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.rs-flip-directions button:not(:disabled):active {
  transform: translateY(1px) scale(0.985);
}

.rs-flip-directions button.is-active {
  border-color: rgba(92, 125, 255, 0.78);
  background: linear-gradient(110deg, rgba(52, 123, 255, 0.28), rgba(109, 55, 239, 0.26));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 18px rgba(45, 63, 150, 0.2);
  color: #fff;
}

.rs-flip-directions button.is-active .rs-flip-button-icon {
  color: #b8c8ff;
}

.rs-format-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-format-field select {
  width: 100%;
  min-height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: rgba(7, 12, 22, 0.9);
  color: #dfe5f1;
  font: inherit;
}

.rs-filter-select-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-filter-select-field select {
  width: 100%;
  min-height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: rgba(7, 12, 22, 0.9);
  color: #dfe5f1;
  font: inherit;
}

.rs-filter-mix-field {
  display: grid;
  gap: 11px;
  margin-top: 14px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-filter-mix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rs-filter-mix-header output {
  min-width: 28px;
  color: #dfe5f1;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.rs-filter-mix-field input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.rs-filter-mix-field input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #667dff 0 var(--rs-filter-mix, 100%), rgba(107, 120, 148, 0.34) var(--rs-filter-mix, 100%) 100%);
}

.rs-filter-mix-field input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  appearance: none;
  border: 2px solid #eef2ff;
  border-radius: 50%;
  background: #677cff;
  box-shadow: 0 2px 7px rgba(30, 45, 110, 0.42);
}

.rs-filter-mix-field input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(107, 120, 148, 0.34);
}

.rs-filter-mix-field input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #667dff;
}

.rs-filter-mix-field input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 2px solid #eef2ff;
  border-radius: 50%;
  background: #677cff;
  box-shadow: 0 2px 7px rgba(30, 45, 110, 0.42);
}

.rs-filter-settings select:focus-visible,
.rs-filter-settings input:focus-visible {
  outline: 2px solid #84a4ff;
  outline-offset: 2px;
}

.rs-filter-settings select:disabled,
.rs-filter-mix-field input:disabled {
  cursor: default;
  opacity: 0.48;
}

.rs-quality-current {
  margin-top: 8px !important;
}

.rs-quality-controls[hidden],
.rs-quality-unavailable[hidden] {
  display: none;
}

.rs-quality-unavailable {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(112, 137, 255, 0.36);
  border-radius: 8px;
  background: rgba(54, 76, 154, 0.12);
}

.rs-quality-unavailable strong {
  color: #e7ebf5;
  font-size: 12px;
  font-weight: 600;
}

.rs-quality-unavailable p {
  color: #aab4c8;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.45;
}

.rs-quality-unavailable button {
  min-height: 36px;
  border: 1px solid rgba(112, 137, 255, 0.46);
  border-radius: 7px;
  background: rgba(64, 90, 190, 0.18);
  color: #dce4ff;
  font-size: 11px;
}

.rs-quality-unavailable button:not(:disabled) {
  cursor: pointer;
}

.rs-quality-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-top: 12px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(7, 12, 22, 0.76);
}

.rs-quality-mode button {
  min-height: 32px;
  padding: 0 5px;
  border: 0;
  background: transparent;
}

.rs-quality-mode button.is-active {
  background: linear-gradient(110deg, rgba(52, 123, 255, 0.28), rgba(109, 55, 239, 0.26));
  color: #fff;
}

.rs-quality-slider-field {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-quality-slider-field > span {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.rs-quality-slider-field input {
  width: 100%;
  accent-color: #6b72ff;
}

.rs-quality-limit-field {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-quality-limit-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 7px;
}

.rs-quality-limit-field input,
.rs-quality-limit-field select {
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  background: rgba(7, 12, 22, 0.9);
  color: #dfe5f1;
  font: inherit;
}

.rs-quality-limit-field input[aria-invalid="true"] {
  border-color: rgba(255, 104, 116, 0.84);
  box-shadow: 0 0 0 2px rgba(255, 104, 116, 0.12);
}

.rs-quality-settings .rs-quality-message {
  min-height: 26px;
  margin-top: 10px;
  color: #8e9ab0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
}

.rs-quality-settings .rs-quality-message.is-error {
  color: #ff6874;
  font-weight: 600;
}

.rs-blur-slider-field {
  display: grid;
  gap: 11px;
  margin-top: 13px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-blur-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rs-blur-slider-field input[type="number"] {
  width: 52px;
  min-width: 34px;
  padding: 3px 7px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  background: rgba(7, 12, 22, 0.72);
  color: #dfe5f1;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  appearance: textfield;
}

.rs-blur-slider-field input[type="number"]::-webkit-inner-spin-button,
.rs-blur-slider-field input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.rs-blur-slider-field input[type="number"]:focus {
  border-color: rgba(103, 124, 255, 0.72);
  outline: none;
  box-shadow: 0 0 0 2px rgba(103, 124, 255, 0.14);
}

.rs-blur-slider-field input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.rs-blur-slider-field input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #667dff 0 var(--rs-blur-progress, 0%), rgba(107, 120, 148, 0.34) var(--rs-blur-progress, 0%) 100%);
}

.rs-blur-slider-field input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  appearance: none;
  border: 2px solid #eef2ff;
  border-radius: 50%;
  background: #677cff;
  box-shadow: 0 2px 7px rgba(30, 45, 110, 0.42);
}

.rs-blur-slider-field input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(107, 120, 148, 0.34);
}

.rs-blur-slider-field input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #667dff;
}

.rs-blur-slider-field input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 2px solid #eef2ff;
  border-radius: 50%;
  background: #677cff;
  box-shadow: 0 2px 7px rgba(30, 45, 110, 0.42);
}

.rs-blur-slider-field input[type="range"]:focus-visible {
  outline: 2px solid rgba(103, 124, 255, 0.72);
  outline-offset: 4px;
  border-radius: 4px;
}

.rs-blur-slider-field input:disabled {
  cursor: default;
  opacity: 0.48;
}

.rs-blur-mode-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(7, 12, 22, 0.76);
}

.rs-blur-mode-control button {
  min-width: 0;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #929db1;
  font-size: 11px;
  font-weight: 500;
}

.rs-blur-mode-control button:not(:disabled) {
  cursor: pointer;
}

.rs-blur-mode-control button:not(:disabled):hover {
  color: #e8edf7;
}

.rs-blur-mode-control button.is-active {
  background: linear-gradient(110deg, rgba(52, 123, 255, 0.3), rgba(109, 55, 239, 0.27));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 5px 13px rgba(31, 45, 108, 0.22);
}

.rs-blur-brush-size-field {
  display: grid;
  gap: 11px;
  margin-top: 13px;
  color: var(--rs-editor-muted);
  font-size: 12px;
}

.rs-blur-brush-size-field[hidden] {
  display: none;
}

.rs-blur-brush-size-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rs-blur-brush-size-header input[type="number"] {
  width: 52px;
  min-width: 34px;
  padding: 3px 7px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  background: rgba(7, 12, 22, 0.72);
  color: #dfe5f1;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  appearance: textfield;
}

.rs-blur-brush-size-header input[type="number"]::-webkit-inner-spin-button,
.rs-blur-brush-size-header input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.rs-blur-brush-size-header input[type="number"]:focus {
  border-color: rgba(103, 124, 255, 0.72);
  outline: none;
  box-shadow: 0 0 0 2px rgba(103, 124, 255, 0.14);
}

.rs-blur-brush-size-field input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: #667dff;
  cursor: pointer;
}

.rs-blur-brush-size-field input:disabled {
  cursor: default;
  opacity: 0.48;
}

.rs-editor-command-bar {
  position: relative;
  display: grid;
  grid-template-columns: 38px 38px 72px minmax(0, 1fr);
  gap: 6px;
  margin: auto 16px 0;
  padding-top: 12px;
}

.rs-editor-command-bar::after {
  position: absolute;
  right: -16px;
  bottom: -15px;
  left: -16px;
  height: 1px;
  background: var(--rs-editor-border-soft);
  content: "";
}

.rs-editor-command-bar button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 8px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 90ms ease;
}

.rs-editor-apply-shortcut {
  margin-left: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  opacity: 0.72;
}

.rs-editor-command-bar button:not(:disabled):not(.is-emphasis) {
  border-color: rgba(112, 139, 255, 0.58);
  background: linear-gradient(180deg, rgba(57, 75, 132, 0.7), rgba(31, 42, 79, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 5px 14px rgba(24, 36, 88, 0.22);
  color: #e1e8ff;
  cursor: pointer;
}

.rs-editor-command-bar button:not(:disabled):hover {
  border-color: rgba(139, 162, 255, 0.88);
  background: linear-gradient(180deg, rgba(72, 94, 164, 0.82), rgba(39, 53, 99, 0.86));
  box-shadow: 0 8px 18px rgba(42, 58, 128, 0.32);
  color: #fff;
  transform: translateY(-1px);
}

.rs-editor-command-bar button:not(:disabled):active {
  box-shadow: inset 0 2px 5px rgba(4, 8, 20, 0.32);
  transform: translateY(1px) scale(0.985);
}

.rs-editor-command-bar button:disabled {
  border-color: rgba(148, 163, 184, 0.1);
  background: rgba(10, 16, 28, 0.42);
  color: rgba(174, 184, 202, 0.42);
}

[data-tool-reset]:disabled {
  border-color: rgba(102, 123, 164, 0.26);
  background: linear-gradient(180deg, rgba(34, 46, 72, 0.55), rgba(22, 31, 51, 0.58));
  box-shadow: inset 0 1px 0 rgba(183, 203, 238, 0.035);
  color: #74839f;
}

.rs-editor-command-bar svg {
  width: 17px;
  height: 17px;
}

.rs-editor-main {
  display: grid;
  min-width: 0;
  grid-template-rows: 48px minmax(500px, 1fr) 88px;
}

.rs-editor-filebar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  border-radius: var(--rs-editor-radius) var(--rs-editor-radius) 0 0;
  color: #d6dce7;
  font-size: 13px;
  box-shadow: none;
}

.rs-editor-filebar strong {
  font-weight: 500;
}

.rs-editor-file-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.rs-editor-file-actions button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(8, 13, 23, 0.72);
  color: #b8c1d1;
  font-size: 11px;
  cursor: pointer;
}

.rs-editor-file-actions button:hover,
.rs-editor-file-actions button:focus-visible {
  border-color: rgba(99, 132, 255, 0.66);
  color: #fff;
}

.rs-editor-file-actions button.is-confirming {
  border-color: rgba(99, 132, 255, 0.72);
  color: #fff;
}

.rs-editor-canvas {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: #05080c;
  box-shadow: var(--rs-editor-shadow);
}

.rs-editor-canvas.is-dragging {
  outline: 2px solid rgba(88, 127, 255, 0.82);
  outline-offset: -8px;
  background: #091120;
}

.rs-editor-empty,
.rs-editor-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  text-align: center;
}

.rs-editor-empty-icon {
  display: flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 132, 255, 0.42);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(52, 123, 255, 0.18), rgba(125, 37, 239, 0.13));
  color: #80a4ff;
  box-shadow: 0 16px 36px rgba(28, 52, 133, 0.2);
}

.rs-editor-empty-icon svg {
  width: 29px;
  height: 29px;
}

.rs-editor-empty h2 {
  margin: 18px 0 0;
  color: #f2f5fb;
  font-size: 20px;
  font-weight: 500;
}

.rs-editor-empty p,
.rs-editor-loading span {
  margin: 8px 0 0;
  color: var(--rs-editor-muted);
  font-size: 13px;
}

.rs-editor-empty button {
  min-height: 42px;
  margin-top: 20px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(110deg, #347bff, #6d37ef);
  color: #fff;
  box-shadow: 0 12px 28px rgba(67, 61, 230, 0.25);
  cursor: pointer;
}

.rs-editor-empty small {
  margin-top: 12px;
  color: #758095;
  font-size: 11px;
}

.rs-editor-loading {
  background: rgba(5, 8, 12, 0.82);
  backdrop-filter: blur(4px);
}

.rs-editor-loading strong {
  margin-top: 15px;
  font-size: 15px;
  font-weight: 500;
}

.rs-editor-spinner {
  width: 34px;
  height: 34px;
  margin: 0 !important;
  border: 3px solid rgba(130, 151, 195, 0.24);
  border-top-color: #6991ff;
  border-radius: 50%;
  animation: rs-editor-spin 0.75s linear infinite;
}

@keyframes rs-editor-spin {
  to { transform: rotate(360deg); }
}

.rs-editor-alert {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 5;
  display: grid;
  width: min(560px, calc(100% - 36px));
  gap: 5px;
  padding: 14px 46px 14px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(248, 113, 113, 0.5);
  border-radius: 9px;
  background: rgba(48, 14, 20, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  color: #ffd6d6;
}

.rs-editor-alert strong {
  font-size: 13px;
  font-weight: 600;
}

.rs-editor-alert span {
  color: #f3b8bd;
  font-size: 12px;
  line-height: 1.45;
}

.rs-editor-alert button {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #f3b8bd;
  font-size: 10px;
  cursor: pointer;
}

.rs-editor-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  padding: 24px;
  scrollbar-color: rgba(109, 130, 172, 0.5) rgba(8, 12, 20, 0.8);
}

.rs-filter-look-dock {
  --rs-filter-look-accent: #f0c879;
  --rs-filter-look-accent-rgb: 226, 175, 83;
  position: absolute;
  inset: 8px auto 8px 6px;
  z-index: 6;
  display: flex;
  width: 90px;
  flex-direction: column;
  overflow: visible;
  background: transparent;
}

[data-filter-look-dock="mono"] {
  --rs-filter-look-accent: #ededed;
  --rs-filter-look-accent-rgb: 238, 238, 238;
}

[data-filter-look-dock="moody"] {
  --rs-filter-look-accent: #c2aeef;
  --rs-filter-look-accent-rgb: 157, 132, 211;
}

[data-filter-look-dock="warm"] {
  --rs-filter-look-accent: #f1a070;
  --rs-filter-look-accent-rgb: 220, 118, 70;
}

[data-filter-look-dock="cool"] {
  --rs-filter-look-accent: #9de8ff;
  --rs-filter-look-accent-rgb: 92, 181, 222;
}

[data-filter-look-dock="food"] {
  --rs-filter-look-accent: #ff8f7a;
  --rs-filter-look-accent-rgb: 226, 90, 74;
}

.rs-filter-look-dock[hidden] {
  display: none;
}

.rs-editor:not([data-active-tool="filter"]) .rs-filter-look-dock {
  display: none;
}

.rs-filter-look-dock-header {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
}

.rs-filter-look-dock-header strong {
  color: #f1f4f8;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.095em;
  white-space: nowrap;
  text-transform: uppercase;
}

.rs-filter-look-list {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-rows: repeat(6, minmax(64px, 1fr));
  overflow-y: auto;
  padding: 3px 0;
  scrollbar-color: rgba(108, 126, 158, 0.42) transparent;
}

.rs-filter-look {
  position: relative;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 2px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #aeb7c5;
  cursor: pointer;
}

.rs-filter-look-slot {
  display: block;
  min-height: 64px;
  pointer-events: none;
}

.rs-filter-look::before {
  position: absolute;
  inset: 1px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  content: "";
  pointer-events: none;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.rs-filter-look-icon {
  position: relative;
  display: flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(151, 170, 194, 0.18);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 18%, rgba(97, 119, 151, 0.12), transparent 52%),
    linear-gradient(145deg, rgba(15, 23, 34, 0.98), rgba(5, 9, 14, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.rs-filter-look-icon svg {
  width: 46px;
  height: 46px;
  filter: blur(0.28px);
}

.rs-filter-look-icon--velvet {
  background:
    radial-gradient(circle at 54% 48%, rgba(101, 63, 158, 0.2), transparent 62%),
    linear-gradient(145deg, rgba(18, 17, 31, 0.98), rgba(7, 7, 14, 0.98));
}

[data-filter-look-dock="mono"] .rs-filter-look-icon {
  border-color: rgba(188, 188, 188, 0.24);
  background:
    radial-gradient(circle at 46% 42%, rgba(255, 255, 255, 0.12), transparent 58%),
    linear-gradient(145deg, rgba(18, 18, 18, 0.98), rgba(4, 4, 4, 0.98));
}

[data-filter-look-dock="mono"] .rs-filter-look.is-selected {
  color: #ededed;
}

[data-filter-look-dock="mono"] .rs-filter-look.is-selected .rs-filter-look-icon {
  border-color: rgba(238, 238, 238, 0.68);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.13);
}

.rs-filter-look-name {
  position: relative;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.rs-filter-look:not(:disabled):hover .rs-filter-look-icon {
  border-color: rgba(var(--rs-filter-look-accent-rgb), 0.52);
  box-shadow: inset 0 0 14px rgba(var(--rs-filter-look-accent-rgb), 0.1);
  transform: translateY(-1px);
}

.rs-filter-look:not(:disabled):hover .rs-filter-look-name {
  color: var(--rs-filter-look-accent);
}

.rs-filter-look:not(:disabled):active .rs-filter-look-icon {
  box-shadow: inset 0 0 18px rgba(var(--rs-filter-look-accent-rgb), 0.16);
  transform: translateY(0) scale(0.94);
}

.rs-filter-look:focus-visible {
  outline: 2px solid #84a4ff;
  outline-offset: -2px;
}

.rs-filter-look.is-selected {
  color: var(--rs-filter-look-accent);
}

.rs-filter-look.is-selected::before {
  background: transparent;
}

.rs-filter-look.is-selected .rs-filter-look-icon {
  border-color: rgba(var(--rs-filter-look-accent-rgb), 0.66);
  box-shadow: inset 0 0 15px rgba(var(--rs-filter-look-accent-rgb), 0.12);
}

.rs-filter-look:disabled {
  cursor: default;
  opacity: 0.5;
}

.rs-editor-viewer-toggle-control {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 7;
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(8, 13, 23, 0.82);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  color: #c7d0df;
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.rs-editor:not([data-active-tool="crop"]) .rs-crop-viewer-grid-control,
.rs-editor:not([data-active-tool="blur"]) .rs-blur-viewer-preview-control {
  display: none;
}

.rs-editor-image-stage {
  position: relative;
  flex: 0 0 auto;
  margin: auto;
  overflow: hidden;
  background: #111722;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.34);
}

.rs-editor-image-stage.has-applied-pixel-edit {
  outline: 1px solid rgba(var(--rs-editor-edited-accent-rgb), 0.68);
  outline-offset: 1px;
  box-shadow: 0 0 0 1px rgba(var(--rs-editor-edited-accent-rgb), 0.1),
    0 0 18px rgba(var(--rs-editor-edited-accent-rgb), 0.1),
    0 16px 50px rgba(0, 0, 0, 0.34);
}

.rs-editor-image-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.rs-editor-image-stage.is-straighten-preview canvas[data-image-canvas] {
  transform-origin: 50% 50%;
  will-change: transform;
}

.rs-straighten-rotate-surface {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0, 18px 18px, 18px calc(100% - 18px), calc(100% - 18px) calc(100% - 18px), calc(100% - 18px) 18px, 18px 18px);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.2 12.2A8.1 8.1 0 0 1 20.7 8.4M21.8 15.8A8.1 8.1 0 0 1 7.3 19.6M20.8 5.2v3.7h-3.7M7.2 22.8v-3.7h3.7' stroke='%23030a14' stroke-opacity='.78' stroke-width='4'/%3E%3Cpath d='M6.2 12.2A8.1 8.1 0 0 1 20.7 8.4M21.8 15.8A8.1 8.1 0 0 1 7.3 19.6M20.8 5.2v3.7h-3.7M7.2 22.8v-3.7h3.7' stroke='%23edf4ff' stroke-width='1.65'/%3E%3C/g%3E%3C/svg%3E") 14 14, crosshair;
  touch-action: none;
}

.rs-editor[data-active-tool="rotate"] .rs-straighten-rotate-surface {
  display: block;
}

.rs-straighten-rotate-surface:focus-visible {
  outline: 2px solid rgba(112, 144, 255, 0.82);
  outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
  .rs-editor-image-stage.is-straighten-preview canvas[data-image-canvas] {
    will-change: auto;
  }
}

.rs-editor-image-stage .rs-quality-preview-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.rs-editor-image-stage .rs-quality-preview-canvas[hidden] {
  display: none;
}

.rs-blur-brush-surface {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  cursor: none;
  touch-action: none;
}

.rs-blur-brush-surface[hidden] {
  display: none;
}

.rs-blur-brush-cursor {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(3, 8, 15, 0.8), inset 0 0 0 1px rgba(3, 8, 15, 0.38);
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rs-blur-brush-surface.is-pointer-inside .rs-blur-brush-cursor {
  opacity: 1;
}

.rs-editor-image-stage .rs-crop-frame {
  pointer-events: auto;
}

.rs-editor-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(20, 15, 16, 0.5), transparent 32%, rgba(3, 8, 14, 0.42)),
    linear-gradient(180deg, #2d2731 0%, #373749 35%, #242a35 70%, #10151d 100%);
}

.rs-editor-photo::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 62% 34%, rgba(255, 193, 137, 0.36), transparent 16%),
    radial-gradient(ellipse at 48% 74%, rgba(78, 98, 130, 0.22), transparent 45%),
    linear-gradient(105deg, rgba(125, 74, 63, 0.17), transparent 36%);
  content: '';
}

.rs-photo-sun {
  position: absolute;
  top: 26%;
  left: 63%;
  width: 8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(245, 200, 158, 0.48);
  filter: blur(10px);
}

.rs-photo-ridge {
  position: absolute;
  right: -8%;
  bottom: -21%;
  left: -8%;
  height: 66%;
  border-radius: 50% 50% 0 0;
  transform: rotate(-4deg);
  background: #131b24;
  box-shadow: 0 -18px 52px rgba(39, 47, 64, 0.42);
}

.rs-photo-ridge--far {
  right: 12%;
  bottom: -27%;
  left: 30%;
  height: 69%;
  transform: rotate(11deg);
  background: #262b38;
}

.rs-photo-ridge--near {
  right: 34%;
  bottom: -35%;
  left: -16%;
  height: 77%;
  transform: rotate(12deg);
  background: #101720;
}

.rs-crop-shade {
  display: none;
}

.rs-crop-frame {
  position: absolute;
  top: 8%;
  left: 20%;
  width: 60%;
  height: 84%;
  border: 1px solid rgba(235, 241, 252, 0.56);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.48);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.rs-editor[data-active-tool="adjust"] .rs-crop-frame,
.rs-editor[data-active-tool="resize"] .rs-crop-frame,
.rs-editor[data-active-tool="rotate"] .rs-crop-frame,
.rs-editor[data-active-tool="flip"] .rs-crop-frame,
.rs-editor[data-active-tool="format"] .rs-crop-frame,
.rs-editor[data-active-tool="quality"] .rs-crop-frame,
.rs-editor[data-active-tool="blur"] .rs-crop-frame,
.rs-editor[data-active-tool="filter"] .rs-crop-frame {
  display: none;
}

.rs-rotate-grid {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent calc(33.333% - 0.5px), rgba(238, 243, 252, 0.3) 33.333%, transparent calc(33.333% + 0.5px)),
    linear-gradient(to right, transparent calc(66.666% - 0.5px), rgba(238, 243, 252, 0.3) 66.666%, transparent calc(66.666% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.333% - 0.5px), rgba(238, 243, 252, 0.3) 33.333%, transparent calc(33.333% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.666% - 0.5px), rgba(238, 243, 252, 0.3) 66.666%, transparent calc(66.666% + 0.5px));
  box-shadow: inset 0 0 0 1px rgba(238, 243, 252, 0.14);
}

.rs-editor[data-active-tool="rotate"] .rs-rotate-grid {
  display: block;
}

.rs-flip-cue {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  min-width: 108px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(219, 228, 247, 0.32);
  border-radius: 999px;
  background: rgba(8, 13, 23, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: rgba(241, 245, 252, 0.86);
  font-size: 10px;
  letter-spacing: 0.04em;
  pointer-events: none;
  text-transform: uppercase;
}

.rs-flip-cue-icons {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #9ab4ff;
}

.rs-flip-cue-icon {
  display: none;
  width: 15px;
  height: 15px;
}

.rs-flip-cue.is-horizontal .rs-flip-cue-icon--horizontal,
.rs-flip-cue.is-vertical .rs-flip-cue-icon--vertical {
  display: inline-flex;
}

.rs-crop-frame::before {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.015);
  content: '';
}

.rs-crop-grid {
  position: absolute;
  display: block;
  opacity: 0.72;
  border: 0;
}

.rs-crop-frame.is-grid-hidden .rs-crop-grid {
  display: none;
}

.rs-crop-grid--v1,
.rs-crop-grid--v2 {
  top: 0;
  bottom: 0;
  border-left: 1px dashed rgba(255, 255, 255, 0.68);
}

.rs-crop-grid--v1 { left: 33.333%; }
.rs-crop-grid--v2 { left: 66.666%; }

.rs-crop-grid--h1,
.rs-crop-grid--h2 {
  right: 0;
  left: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.68);
}

.rs-crop-grid--h1 { top: 33.333%; }
.rs-crop-grid--h2 { top: 66.666%; }

.rs-crop-handle {
  position: absolute;
  z-index: 2;
  display: block;
  width: 18px;
  height: 18px;
}

.rs-crop-handle--nw,
.rs-crop-handle--se { cursor: nwse-resize; }
.rs-crop-handle--ne,
.rs-crop-handle--sw { cursor: nesw-resize; }
.rs-crop-handle--n,
.rs-crop-handle--s { cursor: ns-resize; }
.rs-crop-handle--e,
.rs-crop-handle--w { cursor: ew-resize; }

.rs-crop-handle::before,
.rs-crop-handle::after {
  position: absolute;
  border-radius: 2px;
  background: #fff;
  content: '';
}

.rs-crop-handle::before { width: 18px; height: 5px; }
.rs-crop-handle::after { width: 5px; height: 18px; }
.rs-crop-handle--nw { top: -5px; left: -5px; }
.rs-crop-handle--ne { top: -5px; right: -5px; transform: rotate(90deg); }
.rs-crop-handle--se { right: -5px; bottom: -5px; transform: rotate(180deg); }
.rs-crop-handle--sw { bottom: -5px; left: -5px; transform: rotate(270deg); }

.rs-crop-handle--n,
.rs-crop-handle--s {
  left: 50%;
  width: 22px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: #fff;
}

.rs-crop-handle--n { top: -3px; }
.rs-crop-handle--s { bottom: -3px; }
.rs-crop-handle--n::before,
.rs-crop-handle--n::after,
.rs-crop-handle--s::before,
.rs-crop-handle--s::after,
.rs-crop-handle--e::before,
.rs-crop-handle--e::after,
.rs-crop-handle--w::before,
.rs-crop-handle--w::after { display: none; }

.rs-crop-handle--e,
.rs-crop-handle--w {
  top: 50%;
  width: 6px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: #fff;
}

.rs-crop-handle--e { right: -3px; }
.rs-crop-handle--w { left: -3px; }

.rs-editor-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  height: 39px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 9px;
  background: rgba(12, 18, 30, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.rs-editor-zoom button:not(:disabled) {
  cursor: pointer;
}

.rs-editor-zoom button:focus-visible,
.rs-editor-empty button:focus-visible,
.rs-editor-file-actions button:focus-visible,
.rs-editor-alert button:focus-visible {
  outline: 2px solid #84a4ff;
  outline-offset: 2px;
}

.rs-editor-sr-status {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .rs-editor-spinner {
    animation-duration: 1.8s;
  }
}

.rs-editor-zoom button,
.rs-editor-zoom span {
  display: flex;
  width: 42px;
  height: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #d8deea;
  font-size: 12px;
}

.rs-editor-zoom button svg {
  width: 16px;
  height: 16px;
}

.rs-editor-zoom .rs-editor-fit {
  width: 52px;
  border-left: 1px solid var(--rs-editor-border-soft);
}

.rs-editor-metadata {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  grid-template-rows: repeat(2, 1fr);
  gap: 4px 12px;
  min-height: 68px;
  margin: 14px 0 0;
  padding: 8px 4px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(17, 26, 43, 0.96), rgba(8, 14, 24, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 14px 34px rgba(0, 0, 0, 0.2);
}

.rs-editor-metadata-row {
  display: grid;
  grid-template-columns: 58px 92px 56px 38px minmax(0, 1fr);
  gap: var(--rs-editor-metadata-gap);
  min-width: 0;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.rs-editor-metadata-row--current {
  color: var(--rs-editor-edited-accent);
}

.rs-editor-metadata-row--original {
  color: var(--rs-editor-original-text);
}

.rs-editor-metadata-row strong {
  color: inherit;
  font-size: inherit;
  font-weight: 600;
}

.rs-editor-metadata-row [data-meta-crop-edits] {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  color: inherit;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.rs-editor-metadata-row--original span:last-child {
  display: none;
}

.rs-editor-reset-all {
  grid-row: 1 / 3;
  grid-column: 2;
  min-width: 116px;
  margin: 3px 0;
  padding: 0 14px;
  border: 1px solid rgba(103, 111, 255, 0.58);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(72, 83, 195, 0.56), rgba(92, 55, 170, 0.5));
  color: #f3f5ff;
  font-size: 12px;
  font-weight: 600;
}

.rs-editor-reset-all:not(:disabled) {
  cursor: pointer;
}

.rs-editor-reset-all:disabled {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: #667185;
}

@media (min-width: 1181px) and (max-height: 980px) {
  .rs-editor-main {
    grid-template-rows: 48px minmax(430px, calc(100vh - 336px)) 88px;
  }
}

@media (max-width: 1120px) {
  .rs-editor {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .rs-editor-main {
    grid-template-rows: 48px minmax(440px, 58vh) 88px;
  }

  .rs-editor-metadata {
    --rs-editor-metadata-gap: 12px;
  }
}

@media (max-width: 900px) {
  .rs-editor-metadata {
    --rs-editor-metadata-gap: 12px;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .rs-editor-reset-all {
    grid-row: auto;
    grid-column: 1;
    justify-self: end;
    min-height: 34px;
  }
}

@media (max-width: 820px) {
  .rs-editor {
    grid-template-columns: 1fr;
  }

  .rs-editor-panel {
    height: auto;
    min-height: 0;
  }

  .rs-editor-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rs-editor-tool {
    justify-content: center;
    padding: 0 38px 0 8px;
  }

  .rs-editor-command-bar {
    margin-bottom: 12px;
  }
}

@media (max-width: 620px) {
  .rs-filter-look-dock {
    width: 82px;
  }

  .rs-filter-look-dock-header {
    padding: 0 10px;
  }

  .rs-filter-look-icon {
    width: 44px;
    height: 44px;
  }

  .rs-filter-look-icon svg {
    width: 41px;
    height: 41px;
  }

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

  .rs-editor-tool {
    justify-content: flex-start;
  }

  .rs-editor-filebar {
    gap: 9px;
    padding: 0 12px;
  }

  .rs-editor-file-actions button {
    padding: 0 7px;
    font-size: 9px;
  }

  .rs-editor-filebar > span:not(.rs-editor-file-icon) {
    display: none;
  }

  .rs-editor-main {
    grid-template-rows: 48px minmax(360px, 62vh) auto;
  }

  .rs-crop-frame {
    top: 9%;
    left: 9%;
    width: 82%;
    height: 82%;
  }

  .rs-editor-metadata {
    --rs-editor-metadata-gap: 8px;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 5px;
    padding: 7px;
  }

  .rs-editor-metadata-row {
    grid-template-columns: 58px minmax(92px, 1fr) auto auto;
    min-height: 30px;
    padding: 0 10px;
  }

  .rs-editor-metadata-row [data-meta-crop-edits] {
    grid-column: 2 / -1;
  }

  .rs-editor-reset-all {
    grid-row: auto;
    grid-column: 1;
    min-height: 34px;
  }
}
