:root {
  color-scheme: light;
  background: #ffffff;
  color: #090b09;
  font-family: "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body { margin: 0; }

main {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

smile-face {
  max-width: 100%;
}

.viewport-stage {
  min-height: 100dvh;
  padding: 0;
}

.viewport-square {
  width: 100vmin;
  width: min(100vw, 100dvh);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  container-type: inline-size;
  /* Preserve the whitespace around the 248-unit drawing in the 289-unit reference. */
  --reference-scale: calc(100% * 248 / 289);
  --edge-blur-limit: 1.1px;
  --smile-lift: 5cqw;
}

.viewport-square > smile-face {
  width: var(--reference-scale);
  translate: 0 calc(-1 * var(--smile-lift));
  filter: blur(0.8px);
  filter: blur(min(var(--edge-blur-limit), 0.25cqw));
}

@media (max-width: 600px), (pointer: coarse) and (max-height: 600px) {
  .viewport-square > smile-face {
    filter: blur(0.5px);
    filter: blur(min(0.5px, 0.13cqw));
  }
}
