:root {
  --bg: #1d0a42;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; background: var(--bg); color: #fff; }

body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 120px;
  padding: 38px 48px 0 120px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 2;
}

.top h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 200;
  letter-spacing: 0;
  line-height: 1;
}

.user {
  pointer-events: auto;
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  padding-top: 8px;
}
.user:hover { color: rgba(255,255,255,.8); }

main {
  position: absolute;
  inset: 0;
  overflow-x: auto;
  overflow-y: hidden;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.3) transparent;
}

.groups {
  display: flex;
  gap: 80px;
  padding: 130px 120px 0;
  width: max-content;
  min-height: 100%;
}

.group h2 {
  margin: 0 0 18px;
  height: 22px;
  font-size: 20px;
  font-weight: 300;
  line-height: 22px;
  white-space: nowrap;
}

.grid { position: relative; }

.tile {
  position: absolute;
  display: block;
  overflow: hidden;
  background: var(--c);
  color: #fff;
  text-decoration: none;
  outline: none;
  transform-origin: 50% 50%;
  transition: transform .12s ease-out;
}
.tile:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
.tile:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255,255,255,.35);
  pointer-events: none;
}

.faces {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.face {
  position: absolute;
  left: 0; right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.face svg {
  width: 40%;
  max-width: 64px;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.wide .face.icon svg, .large .face.icon svg { width: 22%; max-width: 72px; }
.large .face.icon svg { width: 30%; max-width: 96px; }
.small .face svg { width: 50%; }

.face.img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  display: block;
}

.face.text {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10px 12px 34px;
}
.face.text p {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
}
.wide .face.text p, .large .face.text p {
  font-size: 20px;
  line-height: 26px;
  font-weight: 300;
}

.label {
  position: absolute;
  left: 10px;
  bottom: 7px;
  right: 34px;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .3s;
}
.tile.on-img .label, .tile.on-img .badge { opacity: 0; }

.badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  transition: opacity .3s;
}
.badge svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }
.small .label { display: none; }
.small .badge { right: 5px; bottom: 5px; width: 12px; height: 12px; }

#splash {
  position: fixed;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transform-origin: 0 0;
}
#splash svg {
  width: 96px;
  height: 96px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

html:has(> body.phone) { --bg: #000; }
body.phone { overflow: auto; }
body.phone .top { display: none; }
body.phone main { position: static; overflow: visible; }
body.phone .groups {
  display: block;
  padding: max(28px, env(safe-area-inset-top)) 0 48px;
  width: auto;
}
body.phone .group h2 { display: none; }
body.phone .tile:hover::after { display: none; }
body.phone .label { left: 8px; bottom: 5px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .tile, .label, .badge { transition: none; }
}
