html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.ft-frame {
  width: min(260px, 78vw);
}

.ft-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ft-tabs {
  position: relative;
  display: flex;
  gap: 0;
  width: fit-content;
  padding: 4px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.ft-tab {
  position: relative;
  z-index: 1;
  flex: 0 0 64px;
  text-align: center;
  padding: 8px 0;
  font: 600 12px/1 -apple-system, "Segoe UI", sans-serif;
  color: #fff7e6;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ft-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 64px;
  border-radius: 999px;
  background: #2f6df6;
  transform: translateX(0);
  transition: transform 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

#ft-1:checked ~ .ft-tabs .ft-indicator {
  transform: translateX(0);
}

#ft-2:checked ~ .ft-tabs .ft-indicator {
  transform: translateX(64px);
}

#ft-3:checked ~ .ft-tabs .ft-indicator {
  transform: translateX(128px);
}

.ft-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ft-tile {
  aspect-ratio: 4/3;
  border-radius: 8px;
  transition: opacity 300ms cubic-bezier(0.2, 1.4, 0.4, 1), transform 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.ft-tile[data-cat=photo] {
  background: radial-gradient(30px circle at 35% 35%, rgba(255, 255, 255, 0.55), transparent 60%), linear-gradient(150deg, #2f6df6, #17141a);
}

.ft-tile[data-cat=video] {
  background: radial-gradient(30px circle at 60% 40%, rgba(255, 255, 255, 0.55), transparent 60%), linear-gradient(150deg, #fff7e6, #2f6df6);
}

.ft-frame:has(#ft-2:checked) .ft-tile:not([data-cat=photo]) {
  opacity: 0.15;
  transform: scale(0.94);
  pointer-events: none;
}

.ft-frame:has(#ft-3:checked) .ft-tile:not([data-cat=video]) {
  opacity: 0.15;
  transform: scale(0.94);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .ft-indicator, .ft-tile {
    transition: none !important;
  }
}
