[hidden] {
  display: none !important;
}

.frame-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.photo-preview:not(.has-photo) .frame-overlay {
  opacity: .42;
}

.photo-preview { touch-action: none; user-select: none; cursor: grab; }
.photo-preview.dragging { cursor: grabbing; }
.photo-preview canvas { position:absolute; inset:0; width:100%; height:100%; z-index:1; display:none; }
.photo-preview.has-photo canvas { display:block; }
.photo-adjust { width:100%; margin-top:13px; }
.adjust-help { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:7px; color:rgba(255,255,255,.62); font-size:11px; }
.adjust-help button { padding:5px 8px; border:1px solid rgba(255,255,255,.18); border-radius:7px; background:rgba(255,255,255,.08); color:#fff; font-size:10px; cursor:pointer; }
.photo-adjust>label { display:block; color:rgba(255,255,255,.72); font-size:11px; font-weight:700; margin-bottom:5px; }
.photo-adjust input[type="range"] { width:100%; accent-color:var(--yellow); }

.crop-circle {
  position: absolute;
  inset: 4px;
  z-index: 4;
  border: 2px dashed rgba(255,255,255,.9);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0,10,35,.18), inset 0 0 0 1px rgba(0,0,0,.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.photo-preview.has-photo .crop-circle { opacity: 1; }

.youtube .link-icon { background: #ff0033; }
.youtube::before { background: #ff0033; }
.facebook .link-icon { background: #1877f2; }
.facebook::before { background: #1877f2; }
.site .link-icon, .outro .link-icon { background: linear-gradient(145deg, #1d70c9, #0d7c35); }
.site::before, .outro::before { background: #36a461; }

.link-icon:has(img) {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.link-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar img {
  width: 100%;
  height: 100%;
  border: 3px solid var(--navy);
  border-radius: 50%;
  object-fit: cover;
}

.profile-logo {
  display: block;
  width: min(88%, 330px);
  max-height: 115px;
  margin: 10px auto 4px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.32));
}

footer { text-align: center; line-height: 1.8; }
footer a { color: rgba(255,255,255,.48); text-decoration: none; }

.save-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 8, 28, .96);
}

.save-overlay img {
  display: block;
  width: min(92vw, 520px);
  max-height: 72vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  -webkit-touch-callout: default;
}

.save-overlay p {
  margin: 18px 0 0;
  color: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
}

.save-overlay button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 27px;
}
