.frame-maker-page {
  background: #f4f9fd;
}

.frame-maker {
  width: min(760px, 92%);
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
  color: #123b61;
}

.frame-maker h1 {
  margin: 0 0 0.35rem;
  color: var(--blue-dark);
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.15;
}

.frame-maker-intro {
  margin: 0;
  line-height: 1.5;
}

.frame-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 1rem 0;
}

.frame-choice {
  padding: 0.45rem;
  color: #075b91;
  font-weight: 750;
  background: #fff;
  border: 2px solid #c9e4f4;
  border-radius: 14px;
  cursor: pointer;
}

.frame-choice:hover,
.frame-choice:focus-visible {
  border-color: #63aed9;
}

.frame-choice.active {
  border-color: #087dc3;
  box-shadow: 0 0 0 3px rgba(8, 125, 195, 0.13);
}

.frame-choice img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #eaf5fc;
  border-radius: 9px;
}

.frame-choice span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

.frame-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 1.1rem 0;
  overflow: hidden;
  touch-action: none;
  background: #000;
  box-shadow: 0 10px 30px rgba(17, 51, 68, 0.27);
}

.user-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  user-select: none;
  pointer-events: none;
  transform-origin: center;
}

.user-photo:not([src]) {
  display: none;
}

.selected-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.frame-controls {
  display: grid;
  gap: 0.75rem;
}

.frame-control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.frame-button {
  display: inline-block;
  padding: 0.8rem 1.05rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.2;
  background: #087dc3;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.frame-button.secondary {
  padding: calc(0.8rem - 2px) calc(1.05rem - 2px);
  color: #075b91;
  background: #fff;
  border: 2px solid #8fc9ea;
}

.frame-button:hover:not(:disabled),
.frame-button:focus-visible:not(:disabled) {
  filter: brightness(0.94);
}

.frame-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.photo-zoom {
  flex: 1;
  min-width: 180px;
}

#photo-file {
  display: none;
}

.frame-note {
  margin: 0.75rem 0 0;
  color: #547085;
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .frame-maker {
    width: min(94%, 760px);
    padding-top: 1.75rem;
  }

  .frame-choices {
    gap: 0.4rem;
  }

  .frame-choice {
    padding: 0.3rem;
  }

  .frame-choice span {
    font-size: 0.68rem;
  }
}
