color-picker {
  max-width: 100%;
  display: inline-block;
}

color-picker .picker {
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 2vw;
  display: flex;
}

color-picker .swatch {
  cursor: pointer;
  border: 2px solid #444;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  padding: 0;
}

color-picker .swatch[aria-checked="true"] {
  box-shadow: inset 0 0 0 2px #fff;
}
*, :before, :after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  interpolate-size: allow-keywords;
}

* {
  margin: 0;
  line-height: calc(4px + 2ex);
}

body {
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  max-width: 100%;
  display: block;
}

input, button, textarea, select {
  font: inherit;
}

p {
  text-wrap: pretty;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

#root {
  isolation: isolate;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

:root {
  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light;
  --black: #0f172a;
}

body {
  color: var(--black);
  margin: 4rem;
  font-family: Gill Sans, Gill Sans MT, Calibri, Trebuchet MS, sans-serif;
}

color-picker {
  flex: auto;
  margin-bottom: 0;
}

color-picker button {
  transition: all .2s;
}

main {
  --selected-color: transparent;
  border: 1px solid #000;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
  height: 50vh;
  margin: 0 auto;
  padding: 2rem 5vw;
  display: flex;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .15);
}

.picker-row {
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  display: flex;
}

.selected-preview {
  background: var(--selected-color, transparent);
  border: 1px solid #000;
  width: 4rem;
  min-width: 4rem;
  height: 4rem;
}

h1 {
  border-bottom: 2px solid;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: .2em;
  font-size: max(1rem, min(6vw, 2rem));
}

output {
  font-weight: 700;
}
