* {
  box-sizing: border-box;
}

:root {
  --ink: #161616;
  --line: rgba(0, 0, 0, 0.12);
}

/* Base */
body {
  margin: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;  
  background: #eee9df;
  color: var(--ink);
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  gap: 32px;
  min-height: 100vh;
  padding: 32px;
}

.preview-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 64px);
}

.public-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eee9df;
}

.public-wrap {
  width: min(100%, 600px);
}

/* Editor */
.editor {
  align-self: start;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.brand {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 300;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.intro {
  opacity: 0.6;
}

.group {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

/* Forms */
label {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 300;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size:13px;
}

.link-label-input {
  width: 7rem;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  opacity: 0.7;
}

.avatar-row img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.link-row {
  display: grid;
  grid-template-columns: 0.5fr 2fr auto auto auto;
  gap: 8px;
  margin-bottom: 8px;
}

.link-label {
  padding-top: 16px;
  color: #333;
  font-size: 11px;
}

.link-row button,
.secondary,
.save {
  border: 0;
  border-radius: 4px;
  padding: 5.3px;
  font-weight: 600;
  cursor: pointer;
}

.link-row button {
  background: #eee;
}

.secondary {
  background: none;
}

.save {
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  background: #a51d2d;
  color: #fff;
  font-size: 16px;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;  
}

#msg {
  font-weight: 600;
}
.success { 
	color: green;
	}
.error {
	color: #b42318;
	}
	
/* Card */
.card {
  width: min(100%, 600px);
  padding: 44px;
  border-radius: 34px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.15);
  transition: 0.25s;
}

.kicker {
  margin-bottom: 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.52;
}

.hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
}

.avatar {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
}

.card h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 0.95;
}

.domain {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 400;
}

.bio {
  margin: 0 0 30px;
  font-size: 18px;
  line-height: 1.6;
}

.links {
  display: grid;
  gap: 12px;
}

.links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 400;
}

.links a::after {
  content: "↗";
  opacity: 0.55;
}

footer {
  margin-top: 30px;
  font-size: 13px;
  text-align: center;
  opacity: 0.5;
}

/* Themes */
.theme-minimal {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  color: #151515;
}

.theme-minimal .domain {
  color: #9b1c31;
}

.theme-minimal .links a {
  background: #fff;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.theme-classic {
  background: #fff8ec;
  color: #24190f;
  border: 1px solid rgba(80, 51, 24, 0.18);
  font-family: Georgia, Cambria, "Times New Roman", serif;
}

.theme-classic .avatar {
  border: none;
}

.theme-classic .domain,
.theme-classic .kicker {
  color: #831f28;
}

.theme-classic .links a {
  background: #2f3d31;
  color: #fff8ec;
}

.theme-night {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 0, 128, 0.26), transparent 35%),
    radial-gradient(circle at 90% 20%, rgba(0, 198, 255, 0.22), transparent 35%),
    rgba(14, 14, 24, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.theme-night .avatar {
  border: none;
  box-shadow: 0 0 45px rgba(255, 0, 128, 0.45);
}

.theme-night .domain {
  color: #ff4db8;
}

.theme-night .links a {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.theme-night a {
  color: #fff !important;
}

.theme-local {
  background: #fbf1df;
  color: #2c1a12;
  border: 1px solid rgba(87, 49, 26, 0.14);
  font-family: Palatino, "Book Antiqua", Georgia, serif;
}

.theme-local .avatar {
  border: 2px solid #e0a15f;
}

.theme-local .domain {
  color: #b94e24;
}

.theme-local .links a {
  background: #b94e24;
  color: #fffaf2;
}

/* Responsive */
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .preview-wrap {
    min-height: auto;
  }
}

@media (max-width: 650px) {
  .app {
    padding: 16px;
  }

  .editor,
  .card {
    padding: 24px;
  }

  .hero {
    display: block;
  }

  .avatar {
    margin-bottom: 20px;
  }

  .link-row {
    grid-template-columns: 1fr;
  }

  .link-row button {
    width: 100%;
  }
}