.profile-frame-body {
  background: var(--off-white);
}

.profile-frame-page {
  background:
    linear-gradient(180deg, rgba(248, 248, 246, 0) 0, var(--off-white) 32rem),
    var(--off-white);
}

.profile-frame-hero {
  position: relative;
  padding: calc(var(--header-height) + 2rem) 0 2.25rem;
  overflow: hidden;
  color: var(--white);
  background: var(--green-primary);
}

.profile-frame-bg {
  position: absolute;
  inset: 0;
}

.profile-frame-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-frame-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(7, 32, 73, 0.90), rgba(15, 92, 46, 0.86) 54%, rgba(234, 179, 8, 0.48)),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, 0.11) 0 2px, transparent 2px 22px);
}

.profile-frame-bg span {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  height: 9rem;
  background: linear-gradient(180deg, transparent, var(--off-white));
}

.profile-frame-hero-inner {
  position: relative;
  z-index: 3;
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.profile-frame-hero .section-kicker {
  margin-bottom: 0.8rem;
}

.profile-frame-hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.45rem, 12vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-frame-hero p {
  max-width: 39rem;
  margin: 1rem auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(0.98rem, 3.6vw, 1.12rem);
  line-height: 1.65;
}

.profile-frame-tool {
  padding: 1.25rem 0 clamp(3.25rem, 7vw, 5rem);
}

.profile-frame-tool [hidden] {
  display: none !important;
}

.profile-frame-layout {
  display: grid;
  gap: 1rem;
}

.profile-frame-editor-card,
.profile-frame-privacy,
.profile-frame-steps {
  border: 1px solid rgba(15, 92, 46, 0.11);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.profile-frame-editor-card {
  padding: clamp(0.85rem, 3.5vw, 1.35rem);
}

.profile-frame-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.profile-frame-editor-head .section-kicker {
  margin-bottom: 0.55rem;
}

.profile-frame-editor-head h2,
.profile-frame-privacy h2,
.profile-frame-steps h2 {
  margin: 0;
  color: var(--black);
  font-family: var(--font-heading);
  font-size: clamp(1.55rem, 7vw, 2.25rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-frame-small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  border: 1px solid rgba(15, 92, 46, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  background: var(--white);
  color: var(--green-primary);
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.profile-frame-small-button:disabled,
.profile-frame-controls[aria-disabled="true"] {
  opacity: 0.48;
}

.profile-frame-small-button:not(:disabled):hover,
.profile-frame-small-button:not(:disabled):focus-visible {
  background: var(--green-primary);
  color: var(--white);
}

.profile-frame-canvas-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(15, 92, 46, 0.13);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(220, 252, 231, 0.38)),
    repeating-linear-gradient(45deg, rgba(15, 92, 46, 0.06) 0 10px, rgba(255, 255, 255, 0.5) 10px 20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.profile-frame-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.profile-frame-canvas-wrap.is-dragging canvas {
  cursor: grabbing;
}

.profile-frame-empty,
.profile-frame-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  text-align: center;
  pointer-events: none;
}

.profile-frame-empty > * {
  width: min(100%, 18rem);
}

.profile-frame-empty strong {
  color: var(--green-dark);
  font-family: var(--font-heading);
  font-size: clamp(1.55rem, 7vw, 2.35rem);
  line-height: 1;
  text-transform: uppercase;
}

.profile-frame-empty p {
  margin: 0.65rem auto 1rem;
  color: var(--gray-700);
  line-height: 1.55;
}

.profile-frame-empty .btn {
  width: 100%;
  min-height: 3.25rem;
  pointer-events: auto;
}

.profile-frame-tool.is-photo-loaded .profile-frame-empty {
  display: none;
}

.profile-frame-loading {
  z-index: 5;
  background: rgba(8, 53, 29, 0.72);
  color: var(--white);
  backdrop-filter: blur(4px);
}

.profile-frame-loading[hidden] {
  display: none !important;
}

.profile-frame-loading span {
  width: 2.75rem;
  height: 2.75rem;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: var(--gold);
  border-radius: 999px;
  animation: profileFrameSpin 0.85s linear infinite;
}

.profile-frame-loading p {
  margin: 0.8rem 0 0;
  font-weight: 800;
}

.profile-frame-status {
  min-height: 1.35rem;
  margin-top: 0.75rem;
  color: var(--gray-500);
  font-size: 0.88rem;
  line-height: 1.45;
}

.profile-frame-status.is-error {
  color: var(--danger);
  font-weight: 700;
}

.profile-frame-status.is-success {
  color: var(--success);
  font-weight: 700;
}

.profile-frame-controls {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.95rem;
  transition: opacity 0.2s ease;
}

.profile-frame-controls p {
  margin: 0;
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.55;
}

.profile-frame-zoom {
  display: grid;
  gap: 0.5rem;
  color: var(--black);
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-frame-zoom-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 0.65rem;
}

.profile-frame-zoom-row button {
  min-height: 3rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--green-primary);
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.profile-frame-zoom-row button:not(:disabled):hover,
.profile-frame-zoom-row button:not(:disabled):focus-visible {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-1px);
}

.profile-frame-zoom-row button:disabled,
.profile-frame-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.profile-frame-zoom-row input {
  width: 100%;
  accent-color: var(--green-primary);
}

.profile-frame-actions {
  display: grid;
  gap: 0.65rem;
}

.profile-frame-actions .btn {
  width: 100%;
  min-height: 3.2rem;
}

.profile-frame-info {
  display: grid;
  gap: 1rem;
}

.profile-frame-privacy,
.profile-frame-steps {
  padding: clamp(1rem, 4vw, 1.35rem);
}

.profile-frame-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.profile-frame-privacy > span {
  display: grid;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  color: var(--green-primary);
}

.profile-frame-privacy p {
  margin: 0.65rem 0 0;
  color: var(--gray-700);
  font-size: 0.94rem;
  line-height: 1.65;
}

.profile-frame-steps ol {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.profile-frame-steps li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--off-white);
}

.profile-frame-steps strong {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--green-dark);
  font-family: var(--font-heading);
}

.profile-frame-steps span {
  color: var(--black);
  font-weight: 800;
}

@keyframes profileFrameSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 760px) {
  .profile-frame-tool {
    padding-top: 2rem;
  }

  .profile-frame-layout {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
    align-items: start;
    gap: 1.25rem;
  }

  .profile-frame-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-frame-actions [data-profile-frame-download],
  .profile-frame-actions [data-profile-frame-share] {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1120px) {
  .profile-frame-hero {
    padding-bottom: 3rem;
  }

  .profile-frame-layout {
    grid-template-columns: minmax(0, 42rem) minmax(20rem, 25rem);
    justify-content: center;
    gap: 1.5rem;
  }
}

@media (max-width: 430px) {
  .profile-frame-editor-head {
    display: grid;
  }

  .profile-frame-small-button {
    width: 100%;
  }

  .profile-frame-privacy {
    display: grid;
  }
}
