.photo-editor__layout {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1.5rem;
  position: relative;
}
.photo-editor__workspace-container {
  min-width: 0;
  display: flex;
  margin: 0 auto;
  justify-content: center;
  flex: 1 1 auto;
}

.photo-editor__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.photo-editor__sidebar--tools {
  flex: 0 0 72px;
  position: relative;
  display: flex;
  padding-left: 15px !important;
  max-width: 80px;
}
.photo-editor__sidebar--layers {
  flex: 0 0 320px;
  position: sticky;
  top: 1.5rem;
  align-self: flex-start;
  z-index: 60;
}
.photo-editor__sidebar--layers > * + * {
  margin-top: 1rem;
}
@media (max-width: 1200px) {
  .photo-editor__sidebar--layers {
    flex-basis: 280px;
  }
}
@media (max-width: 992px) {
  .photo-editor__layout {
    flex-wrap: wrap;
  }
  .photo-editor__sidebar--tools,
  .photo-editor__sidebar--layers {
    flex: 1 1 100%;
  }
  .photo-editor__sidebar--tools {
    order: -1;
  }
  .photo-editor__sidebar--layers {
    position: static;
    top: auto;
  }
  .photo-editor__workspace-container {
    width: 82vw;
    max-width: 82vw;
  }
}
@media (min-width: 993px) {
  .photo-editor__workspace-container {
    width: 50vw;
    max-width: 50vw;
  }
}
@media (min-width: 1100px) {
  .photo-editor__workspace-container {
    width: 55vw;
    max-width: 55vw;
  }
}
@media (min-width: 1600px) {
  .photo-editor__workspace-container {
    width: 65vw;
    max-width: 65vw;
  }
}
.photo-editor__tools-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  position: sticky;
  top: 1.5rem;
  z-index: 2000;
}
.photo-editor__tool-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  padding-right: 1px !important;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.12);
  max-width: 70px !important;
}
.photo-editor__tool-item {
  display: flex;
  align-items: center;
}

.photo-editor__toolbelt-color-button,
.photo-editor__tool-button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-editor__tool-button span[aria-hidden="true"] {
  font-size: 1.35rem;
}
.photo-editor__tool-settings-toggle {
  border: none;
  background: transparent;
  color: #6c757d;
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.photo-editor__tool-settings-toggle:hover,
.photo-editor__tool-settings-toggle:focus {
  color: var(--secondary);
  background-color: var(--primary02);
}
.photo-editor__tool-helpers {
  display: flex;
}
.photo-editor__shortcuts {
  display: flex;
  align-items: center;
  position: relative;
}
.photo-editor__tool-properties {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 0.75rem;
  width: min(320px, calc(100vw - 4rem));
  border-radius: 0.75rem;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease,
    border-color 0.2s ease, background-color 0.2s ease;
  z-index: 1200 !important;
  display: flex;
  flex-direction: column;
  max-height: min(480px, 80vh);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.25);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(8px);
}
.photo-editor__tool-properties.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.photo-editor__tool-properties-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.photo-editor__panel-handle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  cursor: grab;
  touch-action: none;
}
.photo-editor__panel-handle span {
  display: block;
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.25);
}
.photo-editor__panel-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-left: auto;
}
.photo-editor__panel-action {
  border: none;
  background: transparent;
  color: #6c757d;
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  line-height: 1;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.photo-editor__panel-action:hover,
.photo-editor__panel-action:focus {
  color: var(--primary, #0d6efd);
  background-color: rgba(15, 23, 42, 0.08);
  text-decoration: none;
}
.photo-editor__panel-action:focus-visible {
  outline: 2px solid var(--primary, #0d6efd);
  outline-offset: 2px;
}
.photo-editor__draggable-panel {
  z-index: 2600 !important;
}
.photo-editor__draggable-panel--dragging {
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
}
.photo-editor__draggable-panel--dragging .photo-editor__panel-handle {
  cursor: grabbing;
}
.photo-editor__panel--minimized [data-panel-body] {
  display: none !important;
}
.photo-editor__panel--minimized .photo-editor__panel-handle {
  margin-bottom: 0.25rem;
}
.photo-editor__tool-properties-title {
  font-weight: 600;
}
.photo-editor__tool-properties-close {
  padding: 0;
  border: none;
  color: #6c757d;
  background: transparent;
}
.photo-editor__tool-properties-close:hover,
.photo-editor__tool-properties-close:focus {
  color: var(--secondary);
  text-decoration: none;
}
.photo-editor__tool-properties-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.photo-editor__tool-settings {
  display: none;
}
.photo-editor__tool-settings.is-active {
  display: block;
}
.photo-editor__layers-panel,
.photo-editor__layer-properties {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.12);
  padding: 1rem;
  position: sticky;
  top: 1.5rem;
  z-index: 50;
}
.photo-editor__layer-properties {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.25);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}
.photo-editor__layer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.photo-editor__layers-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.photo-editor__layers-panel-title {
  font-size: 1rem;
  font-weight: 600;
}
.photo-editor__layers-panel-body {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.photo-editor__background-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.photo-editor__layer-list-wrapper {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.photo-editor__layer-properties-tabs {
  display: inline-flex;
  gap: 0.5rem;
}
.photo-editor__layer-properties-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.photo-editor__layer-properties-tab {
  border: none;
  background: var(--primary02, rgba(13, 110, 253, 0.08));
  color: var(--primary, #0d6efd);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.photo-editor__layer-properties-tab.is-active {
  background: var(--primary, #0d6efd);
  color: #ffffff;
}
.photo-editor__layer-properties-content {
  margin-top: 1rem;
  flex: 1 1 auto;
}
.photo-editor__layer-properties-pane {
  display: none;
}
.photo-editor__layer-properties-pane.is-active {
  display: block;
}
.photo-editor__layer-properties-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.photo-editor__layer-properties-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}
.photo-editor__workspace-card {
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 1.5rem 2.5rem rgba(15, 23, 42, 0.14);
}
.dark-mode .photo-editor__tool-list,
.dark-mode .photo-editor__layers-panel,
.dark-mode .photo-editor__workspace-card {
  background-color: #1f1f2a;
  box-shadow: 0 1.5rem 2.5rem rgba(0, 0, 0, 0.45);
}
.dark-mode .photo-editor__tool-settings-toggle {
  color: #ced4da;
}
.dark-mode .photo-editor__tool-settings-toggle:hover,
.dark-mode .photo-editor__tool-settings-toggle:focus {
  color: #66b2ff;
  background-color: rgba(102, 178, 255, 0.12);
}
.dark-mode .photo-editor__tool-properties-close {
  color: #adb5bd;
}
.dark-mode .photo-editor__tool-properties,
.dark-mode .photo-editor__layer-properties {
  background-color: rgba(6, 7, 10, 0.25);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.6);
}
.dark-mode .photo-editor__tool-properties-close:hover,
.dark-mode .photo-editor__tool-properties-close:focus {
  color: #66b2ff;
}
.dark-mode .photo-editor__panel-handle span {
  background-color: rgba(255, 255, 255, 0.4);
}
.dark-mode .photo-editor__panel-action {
  color: rgba(226, 232, 240, 0.85);
}
.dark-mode .photo-editor__panel-action:hover,
.dark-mode .photo-editor__panel-action:focus {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}
.dark-mode .photo-editor__layer-properties-tab {
  background: var(--primary02, rgba(102, 178, 255, 0.12));
  color: var(--primary, #66b2ff);
}
.dark-mode .photo-editor__layer-properties-tab.is-active {
  background: var(--primary, #66b2ff);
  color: #0b1320;
}
@media (max-width: 768px) {
  .photo-editor__tool-properties {
    left: 0;
    right: 0;
    margin-left: 0;
    top: calc(100% + 0.75rem);
    width: 100%;
  }
}
.photo-editor__stage {
  position: relative;
  display: block;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
  background-color: #f8f9fa;
  background-image: linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.03) 25%,
      transparent 25%
    ),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.03) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.dark-mode .photo-editor__stage {
  background-color: #1f1f2a;
  background-image: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.04) 25%,
      transparent 25%
    ),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
}
.photo-editor__workspace {
  --photo-editor-ruler-size: 2.25rem;
  --photo-editor-guide-color: var(--primary08, rgba(71, 171, 252, 0.75));
  --photo-editor-guide-color-strong: var(--primary, rgba(71, 171, 252, 1));
  --photo-editor-guide-outline: var(--primary04, rgba(71, 171, 252, 0.35));
  --photo-editor-guide-color-preview: var(
    --primary06,
    rgba(71, 171, 252, 0.45)
  );
  --photo-editor-guide-color-preview-border: var(
    --primary,
    rgba(71, 171, 252, 0.6)
  );
  position: relative;
  display: grid;
  grid-template-columns: var(--photo-editor-ruler-size) auto;
  grid-template-rows: var(--photo-editor-ruler-size) auto;
  width: 100%;
  max-width: 100%;
  background-color: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.15);
  overflow: visible;
}
.photo-editor__workspace-card {
  display: flex;
  flex-direction: column;
  height: auto;
}

.photo-editor__workspace-header {
  padding: 0.5rem 1rem 0rem 1rem;
}

.photo-editor__workspace-header,
.photo-editor__workspace-footer {
  background-color: transparent;
  border-color: transparent;
  gap: 0.75rem;
}
.workspace-properties__accordion-card .card-header {
  background-color: transparent;
  border: none;
  padding: 0;
}
.workspace-properties__accordion-card {
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
}
.workspace-properties__accordion-card:last-child {
  border-bottom: none;
}
.workspace-properties__accordion-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 0.75rem 0;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  font-weight: 600;
  text-align: left;
}
.workspace-properties__accordion-toggle:hover {
  text-decoration: none;
  color: inherit;
}
.workspace-properties__accordion-toggle:focus {
  outline: none;
  box-shadow: none;
}
.workspace-properties__accordion-label {
  flex: 1 1 auto;
}
.workspace-properties__accordion-arrow {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.workspace-properties__accordion-arrow::before {
  content: "";
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 0.25rem;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.workspace-properties__accordion-toggle:not(.collapsed)
  .workspace-properties__accordion-arrow::before {
  transform: rotate(-135deg);
}
.workspace-properties__guide-appearance {
  gap: 1rem;
}

.photo-editor__workspace-footer-actions {
  display: flex;
  align-items: center;
}
.photo-editor__workspace-footer-actions .btn + .btn {
  margin-left: 0.5rem;
}
#workspaceCanvasSize {
  cursor: pointer;
}
#workspaceCanvasSize:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.photo-editor__frame-roll,
.photo-editor__animation-controls {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
}
.photo-editor__frame-roll + .photo-editor__animation-controls {
  margin-top: 0;
}
.dark-mode .photo-editor__frame-roll,
.dark-mode .photo-editor__animation-controls {
  background-color: #1f1f2a;
  border-color: rgba(255, 255, 255, 0.12);
}
.photo-editor__frame-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-behavior: smooth;
}
.photo-editor__frame-item {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 0.5rem;
  background-color: #ffffff;
  min-width: 120px;
  padding: 0.35rem 0.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  line-height: 1.2;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.photo-editor__frame-item:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.35);
}
.photo-editor__frame-item.is-active {
  border-color: var(--info);
  box-shadow: 0 0 0 0.1rem rgba(23, 162, 184, 0.25);
}
.dark-mode .photo-editor__frame-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}
.dark-mode .photo-editor__frame-item.is-active {
  border-color: var(--primary02);
  box-shadow: 0 0 0 0.1rem rgba(102, 178, 255, 0.35);
}
.photo-editor__frame-preview {
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  background: repeating-conic-gradient(
      from 45deg,
      rgba(0, 0, 0, 0.08) 0deg 90deg,
      transparent 90deg 180deg
    )
    rgba(248, 249, 250, 0.9);
  margin-bottom: 0.35rem;
}
.photo-editor__frame-index {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
  width: 100%;
  color: #6c757d;
}
.dark-mode .photo-editor__frame-index {
  color: #ced4da;
}
.dark-mode .photo-editor__frame-preview {
  background: repeating-conic-gradient(
      from 45deg,
      rgba(255, 255, 255, 0.08) 0deg 90deg,
      transparent 90deg 180deg
    )
    rgba(33, 37, 41, 0.9);
}
.photo-editor__frame-empty {
  margin-top: 0.75rem;
}
.photo-editor__animation-fps {
  flex: 1 1 auto;
}
.photo-editor__animation-fps input[type="range"] {
  min-width: 160px;
}

.photo-editor__guide-color-input {
  width: 3rem;
  min-height: 2rem;
  padding: 0.125rem;
}

@media (min-width: 768px) {
  .photo-editor__workspace-header {
    flex-wrap: nowrap !important;
  }
}
.photo-editor__workspace-header-left {
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .photo-editor__workspace-header-left {
    flex-wrap: nowrap !important;
    gap: 0.75rem;
  }
}
.photo-editor__workspace-header-left .btn-group {
  flex: 0 0 auto;
}
.photo-editor__workspace-header-left #exportFileName {
  width: 100%;
  max-width: 200px;
}
@media (min-width: 768px) {
  .photo-editor__workspace-header-left #exportFileName {
    flex: 0 1 200px !important;
  }
}
.photo-editor__workspace-actions {
  gap: 0.5rem;
}
.photo-editor__workspace-actions .custom-select {
  min-width: 5rem;
}
.photo-editor__workspace-body {
  padding: 1.25rem 1.25rem 0.75rem;
}
.photo-editor__workspace-footer {
  padding: 0.75rem 1.25rem;
  border-top: none;
}
.photo-editor__palette-card {
  width: 100%;
}
.photo-editor__palette-panel {
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 0.75rem;
  box-shadow: 0 0.85rem 2rem rgba(15, 23, 42, 0.12);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.photo-editor__palette-header {
  gap: 1rem;
  flex-wrap: wrap;
}
.photo-editor__palette-tabs {
  display: flex;
  gap: 0.5rem;
}
.photo-editor__palette-tab {
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: rgba(148, 163, 184, 0.12);
  color: rgba(15, 23, 42, 0.75);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.photo-editor__palette-tab:hover,
.photo-editor__palette-tab:focus-visible {
  color: rgba(15, 23, 42, 0.9);
  border-color: rgba(15, 23, 42, 0.25);
  box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.08);
}
.photo-editor__palette-tab:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.65);
  outline-offset: 2px;
}
.photo-editor__palette-tab.is-active {
  background: rgba(164, 0, 252, 0.15);
  color: #47abfc;
  border-color: rgba(164, 0, 252, 0.35);
  box-shadow: 0 0.75rem 1.5rem rgba(164, 0, 252, 0.22);
}
.photo-editor__palette-panes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.photo-editor__palette-pane {
  display: none;
}
.photo-editor__palette-pane.is-active {
  display: block;
}
.photo-editor__palette-swatches-wrapper {
  display: flex;
  flex-direction: column;
}
@media (hover: hover) {
  .photo-editor__palette-swatches-wrapper {
    justify-content: flex-end;
    max-height: 1.35rem;
    overflow: hidden;
    position: relative;
    transition: max-height 0.35s ease;
  }
  .photo-editor__palette-swatches-wrapper::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1.25rem;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.85) 70%,
      #ffffff 100%
    );
    transition: opacity 0.2s ease;
  }
  .photo-editor__palette-panel:hover .photo-editor__palette-swatches-wrapper,
  .photo-editor__palette-panel .photo-editor__palette-swatches-wrapper:hover {
    max-height: 320px;
  }
  .photo-editor__palette-panel:hover
    .photo-editor__palette-swatches-wrapper::after,
  .photo-editor__palette-panel
    .photo-editor__palette-swatches-wrapper:hover::after {
    opacity: 0;
  }
  .photo-editor__palette-panel .photo-editor__palette-header {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin-bottom 0.3s ease;
  }
  .photo-editor__palette-panel:hover .photo-editor__palette-header {
    max-height: 180px;
    opacity: 1;
    margin-bottom: 0.75rem;
    pointer-events: auto;
  }
}
.photo-editor__palette-swatches {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-wrap: nowrap;
}
.photo-editor__palette-swatches--scroll {
  overflow-x: auto;
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.photo-editor__palette-swatches--scroll::-webkit-scrollbar {
  height: 6px;
}
.photo-editor__palette-swatches--scroll::-webkit-scrollbar-thumb {
  background-color: var(--secondary);
  border-radius: 999px;
}
.photo-editor__palette-swatches--scroll::-webkit-scrollbar-track {
  background-color: transparent;
}
.photo-editor__palette-pill {
  position: relative;
  flex: 0 0 auto;
}
.photo-editor__palette-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease, opacity 0.2s ease;
}
.photo-editor__palette-remove:hover,
.photo-editor__palette-remove:focus-visible {
  transform: scale(1.05);
  background: rgba(220, 53, 69, 0.9);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.35);
}
.photo-editor__palette-remove:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}
.photo-editor__palette-empty {
  font-size: 0.85rem;
  margin-top: 0.75rem;
}
.photo-editor__palette-add-pill {
  width: 34px;
  height: 34px;
  border-radius: 0.65rem;
  border: 2px dashed rgba(15, 23, 42, 0.25);
  background: rgba(148, 163, 184, 0.12);
  color: rgba(15, 23, 42, 0.7);
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}
.photo-editor__palette-add-pill:hover,
.photo-editor__palette-add-pill:focus-visible {
  transform: translateY(-1px);
  background-color: var(--secondary06);
  color: #47abfc;
  border-color: var(--primary06);
  box-shadow: 0 6px 16px var(--primary02);
}
.photo-editor__palette-add-pill:focus-visible {
  outline: 2px solid rgba(164, 0, 252, 0.45);
  outline-offset: 2px;
}
.photo-editor__palette-add-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.photo-editor__palette-popover {
  position: absolute;
  z-index: 40;
  transform: translate(-50%, 0);
  min-width: 220px;
  max-width: 320px;
  pointer-events: auto;
}
.photo-editor__palette-popover-card {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1rem 2.25rem rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.photo-editor__palette-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.photo-editor__palette-color-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 0.5rem;
  background-color: #ffffff;
  padding: 0.25rem;
}
.photo-editor__palette-color-input:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.65);
  outline-offset: 2px;
}
.dark-mode .photo-editor__palette-panel {
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
}
.dark-mode .photo-editor__palette-swatches-wrapper::after {
  background: linear-gradient(
    180deg,
    rgba(42, 44, 61, 0) 0%,
    rgba(42, 44, 61, 0.9) 70%,
    #2a2c3d 100%
  );
}
.dark-mode .photo-editor__palette-tab {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.1);
  color: rgba(226, 232, 240, 0.85);
}
.dark-mode .photo-editor__palette-tab:hover,
.dark-mode .photo-editor__palette-tab:focus-visible {
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(226, 232, 240, 0.4);
  box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.45);
}
.dark-mode .photo-editor__palette-tab.is-active {
  background: var(--secondary06);
  color: #f5e3ff;
  border-color: var(--primary04);
  box-shadow: 0 0.75rem 1.5rem var(--primary02);
}
.dark-mode .photo-editor__palette-remove {
  background: rgba(12, 16, 32, 0.85);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}
.dark-mode .photo-editor__palette-remove:hover,
.dark-mode .photo-editor__palette-remove:focus-visible {
  background: rgba(248, 113, 113, 0.95);
  box-shadow: 0 8px 20px rgba(248, 113, 113, 0.45);
}
.dark-mode .photo-editor__palette-swatches--scroll {
  scrollbar-color: var(--primary02) transparent;
}
.dark-mode .photo-editor__palette-swatches--scroll::-webkit-scrollbar-thumb {
  background-color: rgba(226, 232, 240, 0.35);
}
.dark-mode .photo-editor__palette-empty {
  color: rgba(226, 232, 240, 0.7);
}
.dark-mode .photo-editor__palette-add-pill {
  border-color: rgba(226, 232, 240, 0.35);
  background: rgba(148, 163, 184, 0.25);
  color: rgba(226, 232, 240, 0.85);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.65);
}
.dark-mode .photo-editor__palette-add-pill:hover,
.dark-mode .photo-editor__palette-add-pill:focus-visible {
  background-color: var(--primary02);
  color: #f5e3ff;
  border-color: var(--primary06);
  box-shadow: 0 0 0 1px var(--primary06), 0 8px 18px var(--primary06);
}
.dark-mode .photo-editor__palette-popover-card {
  background: #1f2333;
  border-color: rgba(255, 255, 255, 0.08);
}
.dark-mode .photo-editor__palette-color-input {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(15, 23, 42, 0.45);
}
.photo-editor__canvas-size-controls {
  gap: 0.5rem;
}
.photo-editor__canvas-size-controls input {
  width: 5rem;
  text-align: right;
}
.photo-editor__canvas-size-controls .btn {
  min-width: 2.25rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.photo-editor__canvas-resize-handle {
  position: absolute;
  background: rgba(13, 110, 253, 0.45);
  pointer-events: auto;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  z-index: 6;
  opacity: 0.35;
}
.photo-editor__canvas-resize-handle--right {
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}
.photo-editor__canvas-resize-handle--bottom {
  left: 0;
  bottom: 0;
  height: 10px;
  width: 100%;
  cursor: ns-resize;
  border-bottom-left-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}
.photo-editor__canvas-resize-handle:hover,
.photo-editor__canvas-resize-handle:active {
  background: var(--primary08);
  opacity: 0.85;
}
.photo-editor--transparent-background .photo-editor__workspace {
  background-color: transparent;
}
.dark-mode .photo-editor__workspace {
  background-color: #2a2c3d;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.65);
}
.dark-mode .photo-editor--transparent-background .photo-editor__workspace {
  background-color: transparent;
}
.photo-editor__workspace-surface {
  position: relative;
  grid-row: 2;
  grid-column: 2;
  overflow: hidden;
}
.photo-editor__workspace-surface--drop-target {
  box-shadow: inset 0 0 0 3px rgba(13, 110, 253, 0.35);
}
.dark-mode .photo-editor__workspace-surface--drop-target {
  box-shadow: inset 0 0 0 3px rgba(77, 171, 247, 0.45);
}
.photo-editor__workspace-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}

input[type="range"],
.custom-range {
  accent-color: var(--primary);
}

.photo-editor__slider-tooltip {
  position: absolute;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background-color: rgba(15, 23, 42, 0.92);
  border-radius: 999px;
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.35);
  transform: translate(-50%, -0.5rem);
  transition: opacity 0.16s ease, transform 0.16s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1060;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-variant-numeric: tabular-nums;
}
.photo-editor__slider-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.35rem;
  width: 0.6rem;
  height: 0.35rem;
  transform: translateX(-50%);
  background-color: inherit;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.photo-editor__slider-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -0.85rem);
}

input[type="range"]::-webkit-slider-thumb,
.custom-range::-webkit-slider-thumb {
  background-color: var(--primary);
  margin-top: -0.325rem;
}

input[type="range"]::-moz-range-thumb,
.custom-range::-moz-range-thumb {
  background-color: var(--primary);
  margin-top: -0.325rem;
}

input[type="range"]::-webkit-slider-runnable-track,
.custom-range::-webkit-slider-runnable-track {
  background-color: var(--secondary);
  height: 0.35rem;
  border-radius: 999px;
}

input[type="range"]::-moz-range-track,
.custom-range::-moz-range-track {
  background-color: var(--secondary);
  height: 0.35rem;
  border-radius: 999px;
}

.photo-editor__zoom-control {
  min-width: 180px;
  flex: 1 1 220px;
  gap: 0.5rem;
}
.photo-editor__zoom-slider {
  flex: 1 1 200px;
  min-width: 150px;
  max-width: 320px;
  height: 0.5rem;
}
.photo-editor__zoom-slider::-webkit-slider-runnable-track,
.photo-editor__zoom-slider::-moz-range-track {
  height: 0.35rem;
  border-radius: 999px;
  background: var(--secondary);
}
.photo-editor__zoom-slider::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--primary);
  border: none;
  margin-top: -0.325rem;
  cursor: pointer;
}
.photo-editor__zoom-slider::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--primary);
  border: none;
  margin-top: -0.325rem;
  cursor: pointer;
}
.dark-mode .photo-editor__zoom-slider::-webkit-slider-runnable-track,
.dark-mode .photo-editor__zoom-slider::-moz-range-track {
  background: var(--secondary);
}
.dark-mode .photo-editor__zoom-slider::-webkit-slider-thumb,
.dark-mode .photo-editor__zoom-slider::-moz-range-thumb {
  background-color: var(--primary);
}
.photo-editor__zoom-value {
  min-width: 3.5ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.photo-editor__minimap {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  width: 168px;
  height: 120px;
  background-color: rgba(15, 23, 42, 0.85);
  border-radius: 0.75rem;
  box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: none;
  cursor: crosshair;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.photo-editor__minimap--visible {
  display: block;
}
.dark-mode .photo-editor__minimap {
  background-color: rgba(12, 16, 32, 0.9);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.45);
}
.photo-editor__minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.photo-editor__minimap-viewport {
  position: absolute;
  border: 2px solid rgba(13, 110, 253, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
  pointer-events: none;
  border-radius: 0.25rem;
}
.dark-mode .photo-editor__minimap-viewport {
  border-color: rgba(77, 171, 247, 0.95);
  box-shadow: 0 0 0 1px rgba(12, 16, 32, 0.85);
}

.photo-editor--cropping .photo-editor__brush-preview {
  display: none;
}
.photo-editor__crop-actions {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 25;
}

.photo-editor__crop-actions .btn {
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.2);
}

.dark-mode .photo-editor__crop-actions .btn-outline-light {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.65);
}
.photo-editor__workspace-viewport::after {
  content: none;
}
.photo-editor__workspace-surface--zoomed-out
  .photo-editor__workspace-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 9999px rgba(225, 229, 235, 0.85);
  pointer-events: none;
}
.dark-mode
  .photo-editor__workspace-surface--zoomed-out
  .photo-editor__workspace-viewport::after {
  box-shadow: 0 0 0 9999px rgba(37, 43, 63, 0.85);
}
.photo-editor__ruler-corner {
  grid-row: 1;
  grid-column: 1;
  z-index: 4;
}
.photo-editor__ruler--horizontal {
  grid-row: 1;
  grid-column: 2;
  position: relative;
  height: 100%;
  z-index: 3;
}
.photo-editor__ruler--vertical {
  grid-row: 2;
  grid-column: 1;
  position: relative;
  width: 100%;
  z-index: 3;
}
.photo-editor__ruler {
  position: relative;
  display: block;
  background-color: #f1f3f5;
  color: #6c757d;
  cursor: crosshair;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
  z-index: 3;
  background-image: linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.12) 0,
      rgba(15, 23, 42, 0.12) 1px,
      transparent 1px,
      transparent 100%
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 9px,
      rgba(15, 23, 42, 0.12) 9px,
      rgba(15, 23, 42, 0.12) 10px
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 49px,
      rgba(15, 23, 42, 0.18) 49px,
      rgba(15, 23, 42, 0.18) 50px
    );
}
.photo-editor__ruler--horizontal {
  grid-row: 1;
  grid-column: 2;
  position: relative;
  height: var(--photo-editor-ruler-size);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}
.photo-editor__ruler--vertical {
  grid-row: 2;
  grid-column: 1;
  position: relative;
  width: var(--photo-editor-ruler-size);
  border-right: 1px solid rgba(15, 23, 42, 0.1);
  background-image: linear-gradient(
      to right,
      rgba(15, 23, 42, 0.12) 0,
      rgba(15, 23, 42, 0.12) 1px,
      transparent 1px,
      transparent 100%
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 9px,
      rgba(15, 23, 42, 0.12) 9px,
      rgba(15, 23, 42, 0.12) 10px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 49px,
      rgba(15, 23, 42, 0.18) 49px,
      rgba(15, 23, 42, 0.18) 50px
    );
}
.dark-mode .photo-editor__ruler {
  background-color: #2e3147;
  color: #c5c9d6;
  border-color: rgba(255, 255, 255, 0.08);
  background-image: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.15) 0,
      rgba(255, 255, 255, 0.15) 1px,
      transparent 1px,
      transparent 100%
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 9px,
      rgba(255, 255, 255, 0.18) 9px,
      rgba(255, 255, 255, 0.18) 10px
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 49px,
      rgba(255, 255, 255, 0.28) 49px,
      rgba(255, 255, 255, 0.28) 50px
    );
}
.dark-mode .photo-editor__ruler--vertical {
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.15) 0,
      rgba(255, 255, 255, 0.15) 1px,
      transparent 1px,
      transparent 100%
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 9px,
      rgba(255, 255, 255, 0.18) 9px,
      rgba(255, 255, 255, 0.18) 10px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 49px,
      rgba(255, 255, 255, 0.28) 49px,
      rgba(255, 255, 255, 0.28) 50px
    );
}
.photo-editor__ruler-corner {
  grid-row: 1;
  grid-column: 1;
  width: var(--photo-editor-ruler-size);
  height: var(--photo-editor-ruler-size);
  background-color: #e9ecef;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  border-right: 1px solid rgba(15, 23, 42, 0.1);
  pointer-events: none;
}
.dark-mode .photo-editor__ruler-corner {
  background-color: #26283b;
  border-color: rgba(255, 255, 255, 0.08);
}
.photo-editor__guide-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}
.photo-editor__cursor-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: transparent;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.4);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.1s ease, width 0.08s ease, height 0.08s ease;
  z-index: 10;
  will-change: transform, width, height;
}
.photo-editor__cursor-preview--visible {
  opacity: 1;
}
.photo-editor__cursor-preview[data-brush-shape-mode="polygon"] {
  border-width: 0;
  border-color: transparent;
  box-shadow: none;
}
.photo-editor__cursor-preview[data-brush-shape-mode="polygon"] svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.photo-editor__guide,
.photo-editor__guide-preview {
  position: absolute;
  z-index: 6;
  touch-action: none;
}
.photo-editor__guide {
  cursor: grab;
  pointer-events: auto;
}
.photo-editor__guide-preview {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 20;
}
.photo-editor__guide--horizontal,
.photo-editor__guide-preview--horizontal {
  left: 0;
  right: 0;
  height: 12px;
  transform: translateY(-50%);
}
.photo-editor__guide--horizontal::before,
.photo-editor__guide-preview--horizontal::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 2px;
  border-radius: 1px;
}
.photo-editor__guide--vertical,
.photo-editor__guide-preview--vertical {
  top: 0;
  bottom: 0;
  width: 12px;
  transform: translateX(-50%);
}
.photo-editor__guide--vertical::before,
.photo-editor__guide-preview--vertical::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  border-radius: 1px;
}
.photo-editor__guide::before {
  background-color: var(--photo-editor-guide-color, rgba(164, 0, 252, 0.75));
}
.photo-editor__guide--active::before,
.photo-editor__guide--dragging::before {
  background-color: var(
    --photo-editor-guide-color-strong,
    rgba(164, 0, 252, 1)
  );
  box-shadow: 0 0 0 1px
    var(--photo-editor-guide-outline, rgba(164, 0, 252, 0.35));
}
.photo-editor__guide-preview::before {
  content: "";
  background-color: var(
    --photo-editor-guide-color-preview,
    rgba(164, 0, 252, 0.45)
  );
  border-radius: 1px;
  border: 1px dashed
    var(--photo-editor-guide-color-preview-border, rgba(164, 0, 252, 0.6));
  box-sizing: border-box;
}
.photo-editor__guide-preview--visible {
  opacity: 1;
}
.photo-editor__guide-preview--invalid::before {
  background-color: rgba(220, 53, 69, 0.4);
  border-color: rgba(220, 53, 69, 0.6);
}
.photo-editor__guide-preview-label {
  position: absolute;
  background-color: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.5rem;
  border-radius: 0.35rem;
  box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.35);
  pointer-events: none;
  z-index: 21;
  white-space: nowrap;
}
.dark-mode .photo-editor__guide-preview-label {
  background-color: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.55);
}
.photo-editor__guide-preview--vertical .photo-editor__guide-preview-label {
  top: -0.5rem;
  left: 50%;
  transform: translate(-50%, -100%);
}
.photo-editor__guide-preview--horizontal .photo-editor__guide-preview-label {
  left: -0.5rem;
  top: 50%;
  transform: translate(-100%, -50%);
}
.photo-editor__color-picker {
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dark-mode .photo-editor__color-picker {
  background-color: rgba(15, 23, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
}
.photo-editor__color-active {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.photo-editor__color-active-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.6);
}
.dark-mode .photo-editor__color-active-label {
  color: rgba(255, 255, 255, 0.65);
}
.photo-editor__color-active-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.12);
  background-color: #000000;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85) inset;
}
.dark-mode .photo-editor__color-active-swatch {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 2px rgba(12, 12, 24, 0.95) inset;
}
.photo-editor__color-active-value {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.8);
}
.dark-mode .photo-editor__color-active-value {
  color: rgba(255, 255, 255, 0.85);
}
.photo-editor__color-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.photo-editor__color-section + .photo-editor__color-section {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 0.75rem;
}
.dark-mode .photo-editor__color-section + .photo-editor__color-section {
  border-color: rgba(255, 255, 255, 0.1);
}
.photo-editor__color-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.6);
}
.dark-mode .photo-editor__color-section-label {
  color: rgba(255, 255, 255, 0.65);
}
.photo-editor__color-palette,
.photo-editor__color-history {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.photo-editor__color-palette--inline,
.photo-editor__color-history--linked {
  align-items: flex-start;
}
.photo-editor__color-palette--inline .photo-editor__color-section-label,
.photo-editor__color-history--linked .photo-editor__color-section-label {
  flex: 0 0 100%;
  margin-bottom: 0.2rem;
}
.photo-editor__color-history {
  min-height: 34px;
}
.photo-editor__overlay-palette {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.photo-editor__color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 0.65rem;
  border: 2px solid transparent;
  background-color: var(--photo-editor-color-swatch, #000000);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08),
    0 6px 14px rgba(15, 23, 42, 0.15);
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.photo-editor__color-swatch:hover,
.photo-editor__color-swatch:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12),
    0 8px 18px rgba(15, 23, 42, 0.25);
}
.photo-editor__color-swatch:focus-visible {
  outline: 2px solid var(--primary08);
  outline-offset: 2px;
}
.photo-editor__color-swatch--active {
  border-color: var(--secondary08);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35),
    0 8px 18px rgba(13, 110, 253, 0.25);
}
.dark-mode .photo-editor__color-swatch {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.45);
}
.dark-mode .photo-editor__color-swatch--active {
  border-color: var(--secondary08);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.38),
    0 8px 20px rgba(99, 102, 241, 0.35);
}
.photo-editor__color-custom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.photo-editor__color-input {
  width: 56px;
  min-width: 56px;
  padding: 0.125rem;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 0.5rem;
  background-color: transparent;
}
.dark-mode .photo-editor__color-input {
  border-color: rgba(255, 255, 255, 0.25);
}
.photo-editor__color-history--empty {
  opacity: 0.75;
}
.photo-editor__color-history-empty {
  font-size: 0.75rem;
  color: rgba(15, 23, 42, 0.6);
}
.dark-mode .photo-editor__color-history-empty {
  color: rgba(255, 255, 255, 0.6);
}
.photo-editor__brush-preview {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  min-width: 88px;
  min-height: 88px;
  padding: 0.75rem;
  background-color: rgba(20, 24, 38, 0.9);
  color: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 20;
}
.photo-editor__brush-preview--visible {
  opacity: 1;
  transform: translateY(0);
}
.photo-editor__brush-preview-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background-color: rgba(255, 255, 255, 0.08);
  transition: width 0.12s ease, height 0.12s ease;
}
.photo-editor__brush-preview-circle[data-brush-shape-mode="polygon"] {
  border-width: 0;
  border-color: transparent;
  background-color: transparent;
  box-shadow: none;
}
.photo-editor__brush-preview-circle[data-brush-shape-mode="polygon"] svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.photo-editor__brush-preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.photo-editor__custom-arm-list {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background-color: rgba(15, 23, 42, 0.02);
}
.photo-editor__custom-arm-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.photo-editor__custom-arm-row:last-child {
  margin-bottom: 0;
}
.photo-editor__custom-arm-field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.65);
}
.photo-editor__custom-arm-field input {
  font-size: 0.8125rem;
}
.photo-editor__custom-arm-remove {
  align-self: end;
  padding: 0.25rem 0.35rem;
  line-height: 1;
}
.photo-editor__custom-arm-remove:focus {
  box-shadow: none;
}
.dark-mode .photo-editor__custom-arm-list {
  border-color: rgba(255, 255, 255, 0.08);
  background-color: rgba(255, 255, 255, 0.04);
}
.dark-mode .photo-editor__custom-arm-field label {
  color: rgba(255, 255, 255, 0.7);
}
.dark-mode .photo-editor__brush-preview {
  background-color: rgba(12, 12, 24, 0.9);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.6);
}
.photo-editor__canvas {
  display: block;
  max-width: 100%;
  height: auto;
  background-color: transparent;
}
.photo-editor--color-picking .photo-editor__canvas {
  cursor: crosshair;
}
.photo-editor__layer-list .list-group-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
  padding: 0.45rem 0.5rem;
  min-height: 0;
}
.photo-editor__layer-toolbar {
  gap: 0;
  flex-wrap: wrap;
}
.photo-editor__layer-toolbar .btn-group {
  flex-shrink: 0;
}
.photo-editor__layer-toolbar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-editor__layer-item--background {
  cursor: default;
  padding-left: calc(0.5rem + 1.25rem + 2rem + 0.5rem);
}
.photo-editor__layer-details--background {
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.photo-editor__background-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.photo-editor__background-controls .form-control {
  flex-shrink: 0;
}
.photo-editor__background-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-editor__layer-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  font-size: 0.875rem;
  color: #8b939f;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.photo-editor__layer-handle--active:hover {
  color: var(--primary);
}
.photo-editor__layer-handle--disabled {
  opacity: 0.4;
  cursor: default;
}
.photo-editor__layer-item--dragging .photo-editor__layer-handle,
.photo-editor__layer-list .list-group-item:active .photo-editor__layer-handle {
  cursor: grabbing;
  color: var(--primary);
}
.photo-editor__layer-visibility,
.photo-editor__layer-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.photo-editor__layer-visibility .btn {
  padding: 0.25rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-editor__layer-details {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}
.photo-editor__layer-preview {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.35rem;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.photo-editor__layer-preview canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.photo-editor__layer-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 0.15rem;
}
.photo-editor__layer-title {
  display: flex;
  align-items: center;
}
.photo-editor__layer-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
}
.photo-editor__layer-list .list-group-item.active,
.photo-editor__layer-list .list-group-item.active:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.photo-editor__layer-item--selected:not(.active) {
  background-color: rgba(164, 0, 252, 0.12);
  border-color: rgba(164, 0, 252, 0.25);
}
.dark-mode .photo-editor__layer-item--selected:not(.active) {
  background-color: rgba(164, 0, 252, 0.2);
  border-color: rgba(164, 0, 252, 0.35);
  color: #ffffff;
}
.photo-editor__layer-item--primary {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.dark-mode .photo-editor__layer-item--primary {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}
.photo-editor__layer-list .list-group-item:hover:not(.active) {
  background-color: var(--primary02);
}
.dark-mode .photo-editor__layer-list .list-group-item {
  background-color: #242434;
  border-color: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
}
.dark-mode .photo-editor__layer-list .list-group-item.active {
  background-color: var(--primary06);
  border-color: var(--primary04);
  color: #ffffff;
}
.dark-mode .photo-editor__layer-list .list-group-item:hover:not(.active) {
  background-color: var(--primary02);
}
.dark-mode .photo-editor__layer-handle {
  color: #6f7487;
}
.dark-mode .photo-editor__layer-item--dragging .photo-editor__layer-handle,
.dark-mode
  .photo-editor__layer-list
  .list-group-item:active
  .photo-editor__layer-handle {
  color: #ffffff;
}
.dark-mode .photo-editor__layer-item--hidden .photo-editor__layer-name {
  color: #8d94ae;
}
.dark-mode .photo-editor__layer-preview {
  background-color: #25283a;
  border-color: rgba(255, 255, 255, 0.08);
}
.dark-mode .photo-editor__layer-menu {
  background-color: #2e3044;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.45);
}
.dark-mode .photo-editor__layer-menu-item {
  color: #f1f3f5;
}
.dark-mode .photo-editor__layer-menu-item:hover:not(:disabled),
.dark-mode .photo-editor__layer-menu-item:focus-visible:not(:disabled) {
  background-color: var(--primary02);
}
.photo-editor__layer-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  pointer-events: auto;
}
.photo-editor__layer-options {
  position: relative;
}
.photo-editor__layer-options-button {
  padding: 0.25rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-editor__layer-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 8.5rem;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.15);
  padding: 0.35rem 0;
  display: none;
  z-index: 200;
}
.photo-editor__layer-menu--open {
  display: block;
}
.photo-editor__layer-menu--floating {
  position: fixed;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 2000;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}
.photo-editor__layer-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: none;
  border: 0;
  color: #212529;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}
.photo-editor__layer-menu-item:hover:not(:disabled),
.photo-editor__layer-menu-item:focus-visible:not(:disabled) {
  background-color: var(--primary02);
}
.photo-editor__layer-menu-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.photo-editor__layer-menu-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
}
.photo-editor__layer-item--hidden .photo-editor__layer-preview {
  opacity: 0.45;
}
.photo-editor__layer-item--dragging {
  opacity: 0.85;
}
.photo-editor__layer-item--drop-before {
  box-shadow: inset 0 2px 0 0 var(--primary);
}
.photo-editor__layer-item--drop-after {
  box-shadow: inset 0 -2px 0 0 var(--primary);
}
.photo-editor__layer-rename {
  width: 100%;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
}
.photo-editor__layer-item--hidden .photo-editor__layer-details strong,
.photo-editor__layer-item--hidden .photo-editor__layer-name {
  color: #6c757d;
}
.dark-mode .photo-editor__layer-actions .btn {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.photo-editor__layer-actions .btn:hover {
  border-color: var(--primary);
}
.dark-mode .photo-editor__layer-actions .btn:hover {
  border-color: var(--primary04);
  background-color: var(--primary02);
}
.photo-editor__tool-settings {
  margin-bottom: 1.25rem;
}
.photo-editor__tool-settings:last-of-type {
  margin-bottom: 0;
}
.photo-editor__shortcuts-panel {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}
.photo-editor__shortcuts-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.photo-editor__shortcuts-panel.is-visible {
  display: flex;
}
.photo-editor__shortcuts-card {
  position: relative;
  min-width: min(22rem, 90vw);
  max-width: min(28rem, 90vw);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.25);
}
.photo-editor__shortcuts-card .card-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-top: 2.5rem;
}
.photo-editor__shortcuts-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  color: #6c757d;
}
.photo-editor__shortcuts-close:hover,
.photo-editor__shortcuts-close:focus {
  color: var(--secondary);
  text-decoration: none;
}
.photo-editor input[type="color"].form-control {
  padding: 0;
  height: 2.5rem;
  width: 3rem;
}
.photo-editor__background-input--transparent {
  border-color: var(--secondary06);
  box-shadow: 0 0 0 2px var(--primary02);
}
.dark-mode .photo-editor__background-input--transparent {
  border-color: var(--secondary06);
  box-shadow: 0 0 0 2px var(--primary02);
}
.photo-editor__stage canvas {
  image-rendering: auto;
}
.photo-editor__layer-group-item {
  display: flex;
  align-items: center;
  background-color: var(--primary02);
  border: 1px dashed var(--primary04);
  cursor: pointer;
}
.dark-mode .photo-editor__layer-group-item {
  background-color: var(--primary02);
  border-color: var(--primary04);
}
.photo-editor__layer-group-header {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
}
.photo-editor__layer-group-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  font-size: 0.875rem;
  color: #8b939f;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.photo-editor__layer-group-handle--disabled {
  opacity: 0.4;
  cursor: default;
}
.photo-editor__layer-group-item--dragging {
  opacity: 0.85;
}
.photo-editor__layer-group-item--drop-before {
  box-shadow: inset 0 2px 0 0 var(--primary);
}
.photo-editor__layer-group-item--drop-after {
  box-shadow: inset 0 -2px 0 0 var(--primary);
}
.photo-editor__layer-group-toggle {
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-editor__layer-group-name {
  font-weight: 600;
  flex: 1 1 auto;
}
.photo-editor__layer-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.photo-editor__layer-group-action {
  padding: 0.25rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-editor__layer-group-item--drop {
  border-color: var(--primary);
  background-color: var(--primary02);
}
.photo-editor__layer-group-options {
  position: relative;
}
.photo-editor__layer-group-options-button {
  padding: 0.25rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-editor__layer-group-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 8.5rem;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.15);
  padding: 0.35rem 0;
  display: none;
  z-index: 200;
}
.photo-editor__layer-group-menu--open {
  display: block;
}
.photo-editor__layer-group-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: none;
  border: 0;
  color: #212529;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}
.photo-editor__layer-group-menu-item:hover:not(:disabled),
.photo-editor__layer-group-menu-item:focus-visible:not(:disabled) {
  background-color: var(--primary02);
}
.photo-editor__layer-group-menu-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.photo-editor__layer-item--group-child {
  padding-left: 1.5rem;
  margin-left: 1.5rem;
}
.photo-editor__layer-group-rename input {
  width: 100%;
}
.photo-editor__layer-group-item--hidden {
  opacity: 0.65;
}
.dark-mode .photo-editor__layer-group-item--hidden {
  opacity: 0.55;
}

@supports (anchor-name: --x) {
  .photo-editor__layer-options-button {
    anchor-name: --layer-menu-anchor;
  }
  .photo-editor__layer-group-options-button {
    anchor-name: --group-menu-anchor;
  }

  .photo-editor__layer-menu.photo-editor__layer-menu--open {
    position: fixed;
    z-index: 3000;
    position-anchor: --layer-menu-anchor;

    top: anchor(bottom);
    left: anchor(right);
    transform: translate(-100%, 8px);

    max-height: min(60vh, 420px);
    overflow: auto;
  }

  @position-try --layer-flip-up {
    top: auto;
    bottom: calc(100vh - anchor(top));
    transform: translate(-100%, -8px);
  }

  @position-try --layer-shift-left {
    left: anchor(left);
    transform: translate(0, 8px);
  }

  .photo-editor__layer-group-menu.photo-editor__layer-group-menu--open {
    position: fixed;
    z-index: 3000;
    position-anchor: --group-menu-anchor;

    top: anchor(bottom);
    left: anchor(right);
    transform: translate(-100%, 8px);

    max-height: min(60vh, 420px);
    overflow: auto;
  }

  @position-try --group-flip-up {
    top: auto;
    bottom: calc(100vh - anchor(top));
    transform: translate(-100%, -8px);
  }

  @position-try --group-shift-left {
    left: anchor(left);
    transform: translate(0, 8px);
  }
}

.photo-editor__overlay-dialog {
  position: fixed;
  inset: 0;
  z-index: 2050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.photo-editor__overlay-dialog[hidden] {
  display: none !important;
}

.photo-editor__overlay-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.photo-editor__overlay-dialog-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.photo-editor__overlay-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.photo-editor__overlay-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.photo-editor__overlay-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.photo-editor__overlay-dialog-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  padding: 0;
}

.photo-editor__overlay-dialog-close:focus-visible {
  outline: 2px solid var(--primary, #47abfc);
  outline-offset: 2px;
}

.photo-editor__overlay-dialog-layer-name {
  font-size: 0.85rem;
}

.photo-editor__overlay-color-input {
  width: 100%;
  height: 2.5rem;
  padding: 0.2rem;
}

.dark-mode .photo-editor__overlay-dialog-card {
  background-color: #0f1115;
  color: #f1f1f1;
}

.dark-mode .photo-editor__overlay-dialog-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.dark-mode .photo-editor__overlay-dialog-layer-name {
  color: rgba(255, 255, 255, 0.7);
}
