:root {
  --bg: #fff;
  --panel: #15151c;
  --panel-border: #2a2a35;
  --text: #000;
  --text-dim: #9494a6;
  --accent: #ff2e63;
  --accent-2: #08d9d6;
  --focus: color(display-p3 1 0.3 0.3 / 1);
  --panel: rgba(0,0,0,0.05);
  --subtle: rgba(70,70,70,1);
}

* {
  margin: 0;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-style: normal;
  font-weight: inherit;
  line-height: inherit;
  vertical-align: baseline;
  border: none;
  box-sizing: border-box;
  text-decoration-thickness: 0.6px;
  text-decoration-color: var(--highlight);
  text-underline-offset: 0.3rem;
  text-decoration-skip-ink: none;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-weight: 500;
  overflow: hidden;
  background: white;
  color: black;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.btn {
  height: 2rem;
  padding: 0 3rem 0.05em;
  border-radius: 10rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--focus);
  color: white;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent-2);
}

.btn:disabled {
  background: var(--panel);
  color: var(--subtle);
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-primary {
}

.btn-primary:hover:not(:disabled) {
}

main {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#dropZone {
  border-radius: 100rem;
}

.drop-zone-inner {
  width: 340px;
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid rgba(0,0,0,0);
  border-radius: 100rem;
  cursor: pointer;
  transition: border 0.3s ease;
}

.drop-zone:hover .drop-zone-inner, .drop-zone.drag-over .drop-zone-inner {
  border: 2rem solid var(--focus);
}

.drop-title {
}

.drop-sub {
  margin-top: 1rem;
  font-size: 80%;
  color: var(--subtle);
}

.workspace {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.workspace[hidden] {
  display: none;
}

.canvas-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
}

.status {
  display: none;
}

#canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.controls {
  position: absolute;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  width: 20rem;
  background: rgba(220,220,220,0.6);
  padding: 1.5rem;
  border-radius: 2rem;
  font-size: 80%;
  backdrop-filter: blur(10px) contrast(90%) brightness(108%);
  border: 0.5px solid rgba(255,255,255,0.3);
  transform: translateX(3rem) translateY(50%);
}

.controls.dragging {
  user-select: none;
}

.controls input,
.controls .btn {
  position: relative;
  z-index: 5;
}

.drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 2rem;
  cursor: grab;
  touch-action: none;
}
/* 
.drag-handle::before {
  content: '';
  width: 2.5rem;
  height: 0.3rem;
  border-radius: 100rem;
  background: rgba(0,0,0,0.18);
} */

.controls.dragging .drag-handle {
  cursor: grabbing;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-group.filters {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.control-group.filters .control-group-header {
  flex-grow: 2;
  width: 100%;
}

.control-group.filters .row {
  width: calc(50% - 0.75rem);
}

.control-group .hidden {
  display: none;
}

.control-group:last-of-type {
}

.control-group-header label {
}

.row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

input[type="range"] {
  flex: 1;
  accent-color: var(--focus);
}

input#highPass {
  transform: rotate(180deg);
}

.hint {
  color: var(--subtle);
}

.controls .btn {
  width: 100%;
  margin-top: 1.5rem;
}

footer {
  position: fixed;
  height: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: visible;
  display: flex;
  flex-direction: row;
  align-items: end;
  justify-content: center;
}

footer .btn {
  position: relative;
  bottom: 1.5rem;
  width: calc(100% - 3rem);
  height: 3.5rem;
}

footer .btn:not(:disabled) {
  background-color: var(--focus);
}

@media (min-width: 720px) {
  footer .btn {
    width: 17rem;
  }
}

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