:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f211d;
  background: #f2f0e8;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-width: 320px;
  height: 100%;
  overflow: hidden;
}

body {
  overscroll-behavior: none;
}

main {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 72px);
  overflow: hidden;
}

header {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 16px;
  color: #e04e2f;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.86;
}

.intro {
  margin: 28px 0 24px;
  color: #65675f;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

#photo-stage {
  position: relative;
  min-height: 52vh;
  margin-top: 48px;
  border: 1px dashed #b7b4aa;
  border-radius: 32px;
  overflow: hidden;
}

#empty-message {
  position: absolute;
  inset: 50% auto auto 50%;
  margin: 0;
  color: #8b8c84;
  transform: translate(-50%, -50%);
  text-align: center;
}

#photo-wall {
  position: absolute;
  inset: 0;
  min-height: 52vh;
}

.photo-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  margin: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.photo-item.dragging {
  z-index: 5;
  cursor: grabbing;
}

.photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 30px rgb(34 33 27 / 18%);
  transform: rotate(var(--angle, 0deg));
  transition: transform 180ms ease, filter 180ms ease;
}

.photo-name {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgb(31 33 29 / 88%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, calc(-50% + 8px));
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.photo-item:hover .photo,
.photo-item:focus .photo {
  filter: grayscale(1) brightness(0.48);
  transform: rotate(var(--angle, 0deg)) scale(1.04);
}

.photo-item:hover .photo-name,
.photo-item:focus .photo-name {
  opacity: 1;
  transform: translate(-50%, -50%);
}
