html,
body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: #1B2333;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.view {
  height: 100dvh;
}

.pt-safe-top {
  padding-top: max(env(safe-area-inset-top), 0px);
}

.pb-safe-bottom {
  padding-bottom: max(env(safe-area-inset-bottom), 0px);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  scrollbar-width: none;
}

.shutter-ring {
  border: 4px solid #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.shutter-ring:active {
  transform: scale(0.92);
}



.app-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.app-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #F2622E;
  border: 3px solid #ffffff;
  cursor: pointer;
  margin-top: 0;
}

.app-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #F2622E;
  border: 3px solid #ffffff;
  cursor: pointer;
}

.toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.15s ease;
  display: inline-block;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #ffffff;
  transition: transform 0.15s ease;
}

.peer:checked~.toggle-track {
  background: #F2622E;
}

.peer:checked~.toggle-track::after {
  transform: translateX(16px);
}

.page-card[dragging="true"] {
  opacity: 0.4;
}

#cropStage svg circle {
  touch-action: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.view:not(.hidden) {
  animation: fade-in 0.12s ease-out;
}

#editorView {
  background: #F9F9F4;
}

.editor-stage {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  grid-template-areas:
    "a"
    "a"
    "b";
  background: hsl(220 31% 11% / 1);
}

.editor-preview-slot {
  grid-area: a;
  min-height: 0;
  min-width: 0;
  padding: 12px 16px;
  overflow: hidden;
}

.editor-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: grid;
  place-items: center;
}

.editor-preview-canvas {
  display: block;
  background: #fff;
  border: 1px solid #E5DED6;
  border-radius: 2px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.editor-panel {
  grid-area: b;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: #1B2333;
  color: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 24px rgba(27, 35, 51, 0.15);
}

.editor-panel.hidden {
  display: none;
}

.editor-panel--compact,
.editor-panel--expanded {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 0;
}

.editor-panel--expanded.hidden {
  display: none;
}

.editor-panel-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

.editor-panel-handle span {
  width: 48px;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
}

.editor-summary-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px 16px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
}

.editor-summary-values {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.editor-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.editor-summary-item .material-symbols-outlined {
  font-size: 20px;
}

.editor-summary-expand {
  color: rgba(255, 255, 255, 0.4);
  font-size: 24px;
  flex: none;
}

.editor-presets-block {
  padding-top: 4px;
  min-height: 0;
  overflow: hidden;
}

.editor-presets-heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.editor-presets-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.editor-preset-btn {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 72px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.editor-preset-thumb {
  width: 72px;
  aspect-ratio: 1 / 1.414;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-preset-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editor-preset-btn.is-active .editor-preset-thumb {
  border: 2px solid #F2622E;
}

.editor-preset-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  max-width: 72px;
}

.editor-preset-btn.is-active .editor-preset-label {
  color: #F2622E;
  font-weight: 700;
}

.editor-tune-thumb {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.editor-tune-thumb .material-symbols-outlined {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.8);
}

.editor-preset-btn:active {
  transform: scale(0.96);
}

.editor-expanded-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 48px;
}

.editor-expanded-back {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}

.editor-expanded-title {
  flex: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: #fff;
}

.editor-auto-header {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: none;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.editor-auto-track {
  position: relative;
  width: 48px;
  height: 24px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.15s ease;
  display: inline-block;
}

.editor-auto-track::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #fff;
  transition: transform 0.15s ease;
}

.peer:checked~.editor-auto-track {
  background: #F2622E;
}

.peer:checked~.editor-auto-track::after {
  transform: translateX(24px);
}

.editor-sliders {
  display: grid;
  gap: 20px;
  overflow-y: auto;
  min-height: 0;
  align-content: start;
}

.editor-slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.editor-slider-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  flex: none;
}

.editor-slider-label .material-symbols-outlined {
  font-size: 20px;
}

.editor-slider-value {
  min-width: 40px;
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #F2622E;
  flex: none;
}

.editor-adjust-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.editor-adjust-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F2622E;
  border: 3px solid #fff;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  cursor: pointer;
}

.editor-adjust-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F2622E;
  border: 3px solid #fff;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  cursor: pointer;
}