* {
  padding: 0;
  margin: 0;
  box-sizing: inherit;
}

html {
  color-scheme: dark;
  box-sizing: border-box;
}

@property --bg-color {
  syntax: '<color>';
  inherits: true;
  initial-value: oklch(85%, 0, 0);
}

body {
  --bg-color: oklch(from rgb(22, 33, 65) 15% c h);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
    'Helvetica Neue', sans-serif;
  display: grid;
  place-content: center;
  min-height: 100vh;
  background-color: var(--bg-color, oklch(95%, 0, 0));
  overflow: clip;
}

.card {
  --w: 10rem;
  --h: calc((var(--w) / 2) * 3);
  --c: antiquewhite;
  --stack: attr(data-stack type(<custom-ident>), false);
  background-color: var(--c);
  display: grid;
  transform-origin: 60% 60%;
  place-content: if(style(--stack: false): center ; else: start;);
  color: var(--bg-color);
  font-size: calc(var(--w) / 5);
  width: var(--w);
  height: var(--h);
  border-radius: calc(var(--w) / 10);
  padding: calc(var(--w) / 10);
  position: absolute;
  top: attr(data-y px, calc(50% - calc(var(--h) / 2)));
  left: attr(data-x px, calc(50% - calc(var(--w) / 2)));
  border: 1px solid var(--bg-color);
  cursor: grab;
  box-shadow: 0.5px 1px 2px oklch(from var(--bg-color) 5% c h);
  z-index: attr(data-z type(<number>));
  rotate: if(style(--stack: false): 0deg ; else: attr(data-rotate type(<angle>), 0deg) ;);

  view-transition-name: attr(id type(<custom-ident>), none);

  &:hover,
  &.selected {
    outline: 2px solid var(--c);
    outline-offset: 2px;
  }

  &.selected {
    z-index: 9999;
  }
  &:active {
    cursor: grabbing;
  }
  &::selection {
    background-color: transparent;
  }
}

.blob {
  width: 20rem;
  height: 20rem;
  background-color: oklch(44.708% 0.07441 205.049 / 0.659);
  background-image: linear-gradient(
    to bottom right in oklch,
    oklch(44.708% 0.07441 205.049 / 0.659),
    oklch(38.026% 0.06085 199.771 / 0.879)
  );
  position: absolute;
  bottom: -10%;
  right: -10%;
  border-radius: 30% 60% 20% 40%;
  rotate: 23deg;
  filter: blur(6rem);
  z-index: 0;
  pointer-events: none;
  box-shadow: -20px -20px 0px 10px oklch(56.174% 0.1982 26.408 / 0.764),
    -80px 40px 0px 10px oklch(63.328% 0.19028 142.559 / 0.342);
}
