:root {
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  --mac-blue: #0866d9;
  --desktop-label-shadow:
    0 1px 1px rgb(0 0 0 / 0.9), 0 0 3px rgb(0 0 0 / 0.45);
  --glass: rgb(8 18 12 / 0.88);
  --camera-ratio: 4 / 3;
  --effect-value: 0.24;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.liquid-glass-defs {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.desktop {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 720px;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgb(105 151 188 / 0.08), rgb(55 103 142 / 0.06)),
    url("./resource/selfie_finder/ocean-desktop.jpg") center / cover
      no-repeat;
  user-select: none;
}

.desktop-tint,
.desktop-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.desktop-tint {
  z-index: 0;
  background: linear-gradient(180deg, rgb(194 218 235 / 0.12), transparent 58%);
}

.desktop-noise {
  z-index: 1;
  opacity: 0.13;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

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

.desktop-photo {
  position: absolute;
  width: 172px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.desktop-photo.is-dragging {
  z-index: 30;
  cursor: grabbing;
}

.desktop-photo:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
  border-radius: 13px;
}

.photo-selection {
  display: grid;
  width: 172px;
  height: 172px;
  padding: 12px 13px;
  place-items: center;
  border: 3px solid transparent;
  border-radius: 16px;
  transition:
    background-color 140ms ease,
    border-color 140ms ease;
}

.desktop-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 146px;
  max-height: 104px;
  object-fit: contain;
  border-radius: 11px;
  box-shadow: 0 7px 12px rgb(0 0 0 / 0.2);
  pointer-events: none;
}

.photo-label,
.desktop-label {
  display: inline-block;
  max-width: 220px;
  padding: 3px 7px 4px;
  overflow: hidden;
  color: white;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.08;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: var(--desktop-label-shadow);
  white-space: nowrap;
}

.photo-label {
  margin-top: 3px;
}

.desktop-photo.is-selected .photo-selection {
  border-color: rgb(169 176 187 / 0.88);
  background: rgb(29 50 86 / 0.34);
}

.desktop-photo.is-selected .photo-label {
  background: var(--mac-blue);
  text-shadow: none;
}

.desktop-photo.is-new {
  animation: desktop-photo-arrive 360ms cubic-bezier(0.2, 0.86, 0.25, 1.14);
}

@keyframes desktop-photo-arrive {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.84);
  }
  72% {
    opacity: 1;
    transform: translateY(-2px) scale(1.025);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mode-dock {
  position: absolute;
  z-index: 12;
  top: clamp(38px, 8vh, 94px);
  right: clamp(24px, 4vw, 74px);
  display: grid;
  grid-template-columns: repeat(2, 140px);
  gap: clamp(14px, 2.2vh, 26px) 4px;
  align-items: center;
}

.desktop-icon {
  position: relative;
  display: flex;
  width: 168px;
  min-height: 146px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: default;
}

.desktop-icon:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
  border-radius: 18px;
}

.folder-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  pointer-events: none;
  transition: transform 160ms ease;
}

.desktop-icon:hover .folder-icon {
  transform: translateY(-2px);
}

.desktop-icon:active .folder-icon {
  transform: translateY(0) scale(0.96);
}

.icon-selection {
  position: absolute;
  z-index: 0;
  top: -8px;
  left: 50%;
  display: block;
  width: 112px;
  height: 112px;
  border: 3px solid transparent;
  border-radius: 16px;
  background: transparent;
  opacity: 0;
  transform: translateX(-50%);
  transition:
    opacity 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease;
}

.desktop-label {
  position: relative;
  z-index: 2;
  margin-top: 1px;
}

.desktop-icon.is-selected .icon-selection {
  border-color: rgb(164 171 181 / 0.9);
  background: rgb(32 54 94 / 0.31);
  opacity: 1;
}

.desktop-icon.is-selected .desktop-label {
  background: var(--mac-blue);
  text-shadow: none;
}

.camera-window {
  position: absolute;
  z-index: 20;
  top: 14vh;
  left: 28vw;
  width: min(44vw, 900px);
  min-width: 300px;
  overflow: visible;
  background: transparent;
  touch-action: none;
}

.camera-frame {
  overflow: hidden;
  border: 1px solid rgb(117 125 132 / 0.62);
  border-radius: 11px 11px 3px 3px;
  background: #d7dcdf;
  box-shadow:
    0 26px 68px rgb(6 23 39 / 0.25),
    0 5px 16px rgb(6 23 39 / 0.22);
}

.camera-window.is-dragging .camera-frame {
  box-shadow:
    0 36px 82px rgb(6 23 39 / 0.3),
    0 8px 18px rgb(6 23 39 / 0.24);
}

.camera-titlebar {
  position: relative;
  display: grid;
  height: 32px;
  padding: 0 10px;
  grid-template-columns: 92px 1fr 92px;
  align-items: center;
  border-bottom: 1px solid rgb(142 148 153 / 0.55);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.9), rgb(223 226 228 / 0.93));
  cursor: grab;
}

.camera-window.is-dragging .camera-titlebar {
  cursor: grabbing;
}

.traffic-lights {
  display: flex;
  gap: 9px;
  align-items: center;
}

.traffic-light {
  width: 13px;
  height: 13px;
  border: 0.5px solid rgb(0 0 0 / 0.16);
  border-radius: 50%;
}

.traffic-light-close {
  background: #ff5f57;
}

.traffic-light-minimize {
  background: #febc2e;
}

.traffic-light-zoom {
  background: #28c840;
}

.window-title {
  margin: 0;
  overflow: hidden;
  color: #52575a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: var(--camera-ratio);
  background: #0b0d0c;
}

.camera-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition:
    filter 220ms ease,
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-radius 220ms ease;
}

.camera-video {
  z-index: 2;
  visibility: hidden;
  opacity: 0;
  transform: scaleX(-1);
}

.camera-window.has-camera .camera-video {
  visibility: visible;
  opacity: 1;
}

.camera-window[data-source="upload"] .camera-video {
  transform: none;
}

.camera-window.has-camera .camera-fallback {
  opacity: 0;
}

.camera-fallback {
  z-index: 1;
}

.camera-viewport[data-mode="soft-flash"] :is(.camera-video, .camera-fallback) {
  filter: brightness(calc(0.72 + var(--effect-value) * 0.58))
    saturate(calc(0.96 + var(--effect-value) * 0.12)) contrast(0.97)
    sepia(calc(var(--effect-value) * 0.06));
}

.camera-viewport[data-mode="fish-eye"] :is(.camera-video, .camera-fallback) {
  filter: saturate(1.16) contrast(1.06);
}

.camera-viewport[data-mode="dv-cam"] :is(.camera-video, .camera-fallback) {
  filter: contrast(calc(1.02 + var(--effect-value) * 0.3)) saturate(0.72)
    brightness(1.05) hue-rotate(-5deg);
}

.camera-viewport[data-mode="sticker-booth"] :is(.camera-video, .camera-fallback) {
  filter: saturate(calc(1.14 + var(--effect-value) * 0.42)) contrast(1.04)
    brightness(1.04);
}

.soft-flash-layer,
.fish-eye-layer,
.dv-layer,
.sticker-layer,
.grain-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.soft-flash-layer {
  background:
    radial-gradient(circle at 52% 44%, rgb(255 249 234 / 0.22), transparent 46%),
    linear-gradient(135deg, rgb(255 228 196 / 0.08), transparent 55%);
  opacity: 0;
}

.camera-viewport[data-mode="soft-flash"] .soft-flash-layer {
  opacity: calc(0.28 + var(--effect-value) * 0.56);
}

.fish-eye-layer {
  background:
    radial-gradient(
      circle closest-side at center,
      transparent 0 82%,
      rgb(255 255 255 / 0.15) 84%,
      rgb(10 15 17 / 0.38) 86%,
      rgb(2 5 7 / 0.86) 91%,
      #010203 98% 100%
    );
  opacity: 0;
}

.camera-viewport[data-mode="fish-eye"] .fish-eye-layer {
  opacity: calc(0.72 + var(--effect-value) * 0.26);
}

.dv-layer {
  color: rgb(255 255 255 / 0.92);
  opacity: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 3px,
    rgb(9 16 18 / 0.18) 3px 4px
  );
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(10px, 1.15vw, 17px);
  text-shadow: 1px 1px 0 rgb(0 0 0 / 0.8);
}

.camera-viewport[data-mode="dv-cam"] .dv-layer {
  opacity: calc(0.56 + var(--effect-value) * 0.38);
}

.dv-timestamp,
.dv-rec {
  position: absolute;
  top: 7%;
}

.dv-timestamp {
  left: 5%;
}

.dv-rec {
  right: 5%;
  color: #ff6d65;
}

.sticker-layer {
  opacity: 0;
}

.camera-viewport[data-mode="sticker-booth"] .sticker-layer {
  opacity: 1;
}

.effect-preview {
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.camera-viewport[data-mode="fish-eye"].fisheye-ready .fisheye-preview,
.camera-viewport:is(
    [data-mode="negative-pop"],
    [data-mode="split-charms"],
    [data-mode="fog-glass"],
    [data-mode="color-stars"],
    [data-mode="iphone-3gs"],
    [data-mode="kodak-5219"]
  )
  .composition-preview {
  opacity: 1;
  visibility: visible;
}

.camera-viewport[data-mode="fog-glass"] .composition-preview {
  cursor: crosshair;
  pointer-events: auto;
  touch-action: none;
}

.camera-viewport[data-mode="fish-eye"].fisheye-ready
  :is(.camera-video, .camera-fallback),
.camera-viewport:is(
    [data-mode="negative-pop"],
    [data-mode="split-charms"],
    [data-mode="fog-glass"],
    [data-mode="color-stars"],
    [data-mode="iphone-3gs"],
    [data-mode="kodak-5219"]
  )
  :is(.camera-video, .camera-fallback) {
  opacity: 0;
  visibility: hidden;
}

.negative-text-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.camera-viewport[data-mode="negative-pop"] .negative-text-layer {
  opacity: 1;
}

.negative-word {
  position: absolute;
  color: white;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.negative-word.is-neon {
  color: #87ef00;
}

.sticker-heart-text {
  position: absolute;
  color: var(--heart-color, oklch(0.65 0.262 359.168));
  filter: drop-shadow(
    0 2px 3px
      color-mix(
        in oklch,
        var(--heart-color, oklch(0.65 0.262 359.168)) 18%,
        transparent
      )
  );
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.grain-layer {
  z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: calc(0.04 + var(--effect-value) * 0.22);
}

.camera-viewport[data-mode="soft-flash"] .grain-layer {
  opacity: 0.09;
}

.camera-viewport[data-mode="kodak-5219"] .grain-layer {
  opacity: 0;
}

.live-badge {
  position: absolute;
  z-index: 8;
  top: 18px;
  left: 20px;
  display: none;
  height: 28px;
  padding: 0 11px 0 9px;
  gap: 7px;
  align-items: center;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 999px;
  color: rgb(255 255 255 / 0.9);
  background: rgb(15 18 21 / 0.62);
  box-shadow: 0 2px 9px rgb(0 0 0 / 0.16);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 160ms ease,
    visibility 160ms ease;
}

.camera-window.has-camera[data-source="camera"] .live-badge {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #37d367;
  box-shadow: 0 0 8px rgb(55 211 103 / 0.72);
}

.camera-status {
  position: absolute;
  z-index: 7;
  top: 18px;
  right: 20px;
  max-width: 54%;
  margin: 0;
  padding: 7px 10px;
  overflow: hidden;
  border-radius: 8px;
  color: rgb(255 255 255 / 0.92);
  background: rgb(15 18 21 / 0.52);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  transition: opacity 180ms ease;
  white-space: nowrap;
}

.camera-status.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.camera-controls {
  position: absolute;
  z-index: 9;
  display: grid;
  top: 0;
  left: calc(100% + 14px);
  width: 238px;
  padding: 15px;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 18px;
  color: white;
  background:
    linear-gradient(145deg, rgb(47 59 61 / 0.38), rgb(8 15 14 / 0.24)),
    rgb(13 20 19 / 0.2);
  box-shadow:
    0 24px 54px rgb(0 0 0 / 0.22),
    0 3px 10px rgb(0 0 0 / 0.12),
    inset 0 1px 0 rgb(255 255 255 / 0.22),
    inset 0 -1px 0 rgb(255 255 255 / 0.05);
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(26px) saturate(1.58) contrast(1.05) brightness(1.06);
  -webkit-backdrop-filter: blur(26px) saturate(1.58) contrast(1.05) brightness(1.06);
}

.camera-window.controls-left .camera-controls {
  right: calc(100% + 14px);
  left: auto;
}

.glass-refraction {
  position: absolute;
  z-index: 0;
  inset: -28%;
  border-radius: 38%;
  background:
    radial-gradient(circle at 22% 18%, rgb(255 255 255 / 0.34), transparent 24%),
    radial-gradient(circle at 78% 62%, rgb(141 235 255 / 0.19), transparent 31%),
    radial-gradient(circle at 38% 88%, rgb(255 255 255 / 0.14), transparent 28%),
    linear-gradient(118deg, transparent 18%, rgb(255 255 255 / 0.18) 48%, transparent 74%);
  filter: url("#liquidGlassRefraction");
  mix-blend-mode: soft-light;
  opacity: 0.82;
  pointer-events: none;
  transform: translate3d(-2%, -1%, 0) scale(1.06);
  animation: liquid-glass-drift 12s ease-in-out infinite alternate;
}

.camera-controls::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: inherit;
  background:
    linear-gradient(132deg, rgb(255 255 255 / 0.16), transparent 30%),
    radial-gradient(circle at 92% 6%, rgb(255 255 255 / 0.18), transparent 20%);
  box-shadow:
    inset 1px 1px 0 rgb(255 255 255 / 0.16),
    inset -1px -1px 0 rgb(0 0 0 / 0.13);
  content: "";
  pointer-events: none;
}

.controls-title,
.controls-scroll,
.capture-section {
  position: relative;
  z-index: 2;
}

@keyframes liquid-glass-drift {
  from {
    transform: translate3d(-3%, -1%, 0) scale(1.06) rotate(-1deg);
  }

  to {
    transform: translate3d(3%, 2%, 0) scale(1.1) rotate(1.4deg);
  }
}

.controls-title {
  display: block;
  padding-bottom: 11px;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  color: rgb(255 255 255 / 0.72);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.controls-scroll {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
}

.control-section {
  min-width: 0;
}

.control-kicker {
  display: block;
  color: rgb(255 255 255 / 0.48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1;
}

.ratio-buttons {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  align-items: center;
}

.ratio-buttons button {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 8px;
  color: rgb(255 255 255 / 0.5);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    transform 120ms ease;
}

.ratio-buttons button:hover {
  color: rgb(255 255 255 / 0.82);
  background: rgb(255 255 255 / 0.08);
}

.ratio-buttons button:active {
  transform: scale(0.94);
}

.ratio-buttons button.is-active {
  color: #141717;
  background: #fff;
}

.effect-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.effect-heading output {
  color: rgb(255 255 255 / 0.74);
  font-size: 11px;
  font-weight: 650;
}

.effect-range {
  display: block;
  width: 100%;
  height: 22px;
  margin-top: 11px;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.effect-range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    #fff 0 var(--range-progress, 24%),
    rgb(255 255 255 / 0.22) var(--range-progress, 24%) 100%
  );
}

.effect-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgb(0 0 0 / 0.28);
  appearance: none;
}

.effect-range::-moz-range-track {
  height: 5px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.22);
}

.effect-range::-moz-range-progress {
  height: 5px;
  border-radius: 99px;
  background: #fff;
}

.effect-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgb(0 0 0 / 0.28);
}

.split-controls,
.sticker-controls,
.fog-controls,
.star-controls,
.iphone-controls,
.lut-controls {
  display: grid;
  gap: 13px;
}

.split-controls[hidden],
.sticker-controls[hidden],
.fog-controls[hidden],
.star-controls[hidden],
.iphone-controls[hidden],
.lut-controls[hidden] {
  display: none;
}

.lut-stock-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.lut-status {
  min-height: 1.2em;
  margin: 0;
  color: rgb(255 255 255 / 0.48);
  font-size: 10px;
  font-weight: 580;
  line-height: 1.2;
}

.lut-status.is-error {
  color: rgb(255 176 169 / 0.86);
}

.fog-brush-section,
.star-size-section,
.iphone-grain-section {
  display: grid;
  gap: 1px;
}

.fog-brush-section output,
.star-size-section output,
.iphone-grain-section output {
  color: rgb(255 255 255 / 0.74);
  font-size: 11px;
  font-weight: 650;
}

.split-option-section {
  display: grid;
  gap: 9px;
}

.split-option-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.split-option-button,
.layout-refresh-button {
  min-width: 0;
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid rgb(255 255 255 / 0.13);
  border-radius: 8px;
  color: rgb(255 255 255 / 0.65);
  background: rgb(255 255 255 / 0.04);
  font-size: 11px;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    transform 120ms ease;
}

.split-option-button:hover,
.layout-refresh-button:hover {
  color: white;
  background: rgb(255 255 255 / 0.1);
}

.split-option-button.is-active {
  border-color: rgb(255 255 255 / 0.62);
  color: #151818;
  background: rgb(255 255 255 / 0.94);
}

.split-option-button:active,
.layout-refresh-button:active {
  transform: scale(0.96);
}

.split-option-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.layout-refresh-button {
  width: 100%;
  background: rgb(255 255 255 / 0.08);
}

.capture-section {
  display: flex;
  padding-top: 14px;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.upload-section {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr;
  gap: 7px;
}

.media-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  font-size: 16px;
  white-space: nowrap;
}

.upload-button {
  display: grid;
  width: 100%;
  min-height: 31px;
  padding: 0 10px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 8px;
  color: rgb(255 255 255 / 0.86);
  background: rgb(255 255 255 / 0.08);
  font-size: 11px;
  font-weight: 680;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    transform 120ms ease;
}

.upload-button:hover {
  color: white;
  background: rgb(255 255 255 / 0.14);
}

.upload-button:active {
  transform: scale(0.96);
}

.camera-toggle-button {
  width: 100%;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 0.13);
  border-radius: 8px;
  color: rgb(255 255 255 / 0.68);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    transform 120ms ease,
    opacity 140ms ease;
}

.camera-toggle-button:hover:not(:disabled) {
  color: white;
  background: rgb(255 255 255 / 0.08);
}

.camera-toggle-button:active:not(:disabled) {
  transform: scale(0.96);
}

.camera-toggle-button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.media-upload-input:focus-visible + .upload-button,
.camera-toggle-button:focus-visible,
.split-option-button:focus-visible,
.layout-refresh-button:focus-visible {
  outline: 2px solid #8ec8ff;
  outline-offset: 3px;
}

.shutter-button {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 4px;
  place-items: center;
  border: 3px solid rgb(255 255 255 / 0.9);
  border-radius: 50%;
  outline: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease;
}

.shutter-button span {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  transition:
    background-color 120ms ease,
    transform 120ms ease;
}

.shutter-button:hover span {
  background: #f1f2f2;
}

.shutter-button:active,
.shutter-button.is-capturing {
  transform: scale(0.9);
}

.shutter-button:active span,
.shutter-button.is-capturing span {
  transform: scale(0.78);
}

.shutter-button:focus-visible,
.ratio-buttons button:focus-visible,
.effect-range:focus-visible {
  outline: 2px solid #8ec8ff;
  outline-offset: 3px;
}

.capture-toast {
  position: absolute;
  z-index: 60;
  left: 50%;
  bottom: 28px;
  padding: 11px 16px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  color: white;
  background: rgb(13 19 21 / 0.76);
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.22);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px) scale(0.96);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.86, 0.25, 1.08);
}

.capture-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

@media (max-height: 900px) {
  .mode-dock {
    display: grid;
    top: 28px;
    right: 18px;
    grid-template-columns: repeat(2, 120px);
    gap: 10px 4px;
  }

  .desktop-icon {
    width: 120px;
    min-height: 108px;
  }

  .folder-icon {
    width: 70px;
    height: 70px;
  }

  .icon-selection {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 1050px) {
  .mode-dock {
    top: 26px;
    right: 20px;
    gap: 12px;
  }

  .desktop-icon {
    width: 126px;
    min-height: 118px;
  }

  .folder-icon {
    width: 74px;
    height: 74px;
  }

  .icon-selection {
    width: 92px;
    height: 92px;
  }

  .desktop-label,
  .photo-label {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
