.profile-main {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0 130px;
}

.profile-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.profile-kicker,
.form-heading p {
  margin: 0 0 8px;
  color: #6f8221;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-title h1 {
  max-width: 710px;
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 5.5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.profile-title h1 em {
  color: #68725e;
  font-style: normal;
  font-weight: 300;
}

.save-state {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 0.47rem;
}

.save-state i {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  display: inline-block;
  border-radius: 50%;
  background: #8caf3c;
}

.profile-toggle {
  width: min(520px, 100%);
  margin: 32px 0 20px auto;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #e9e7e1;
}

.profile-toggle button {
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.profile-toggle button > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
  font-size: 0.5rem;
  font-weight: 800;
}

.profile-toggle button strong,
.profile-toggle button small { display: block; }
.profile-toggle button strong { font-size: 0.54rem; }
.profile-toggle button small { margin-top: 3px; color: var(--muted); font-size: 0.42rem; }

.profile-toggle button.is-active {
  background: white;
  box-shadow: 0 5px 18px rgba(31, 33, 29, 0.08);
}

.profile-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(480px, 1.28fr);
  align-items: start;
  gap: 20px;
}

.profile-preview,
.profile-form {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
}

.profile-preview {
  position: sticky;
  top: 96px;
  overflow: hidden;
  padding: 0 24px 26px;
}

.preview-cover {
  height: 132px;
  margin: 0 -24px;
  background:
    radial-gradient(circle at 75% 20%, rgba(183, 217, 50, 0.82), transparent 27%),
    linear-gradient(135deg, #272b25 0 50%, #a8b698 50% 72%, #ded4ea 72%);
}

.preview-avatar,
.preview-business-mark {
  width: 76px;
  height: 76px;
  margin-top: -36px;
  display: grid;
  place-items: center;
  border: 5px solid white;
  border-radius: 50%;
  background: var(--lilac);
  font-size: 0.9rem;
  font-weight: 800;
}

.profile-preview > p {
  margin: 18px 0 5px;
  color: #718322;
  font-size: 0.46rem;
  font-weight: 700;
}

.profile-preview h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  letter-spacing: -0.045em;
}

.profile-preview > span {
  color: var(--muted);
  font-size: 0.52rem;
}

.profile-preview blockquote {
  margin: 20px 0;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #464a43;
  font-size: 0.64rem;
  font-style: normal;
  line-height: 1.65;
}

.profile-preview > a {
  display: flex;
  justify-content: space-between;
  font-size: 0.5rem;
  font-weight: 700;
  text-decoration: none;
}

.business-preview > img {
  height: 180px;
  margin: 0 -24px;
  width: calc(100% + 48px);
  object-fit: cover;
}

.preview-business-mark {
  border-radius: 20px;
  background: var(--ink);
  color: var(--lime);
}

.profile-form { padding: 25px; }

.form-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.form-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.045em;
}

.form-heading > span {
  padding: 6px 8px;
  border-radius: 999px;
  background: #eef2dc;
  color: #61731d;
  font-size: 0.42rem;
  font-weight: 700;
}

.profile-photo-row {
  margin-bottom: 21px;
  padding: 13px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f7f6f2;
}

.profile-photo-row > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lilac);
  font-size: 0.6rem;
  font-weight: 700;
}

.profile-photo-row strong,
.profile-photo-row small { display: block; }
.profile-photo-row strong { font-size: 0.53rem; }
.profile-photo-row small { margin-top: 4px; color: var(--muted); font-size: 0.43rem; }

.profile-photo-row button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 0.44rem;
  font-weight: 700;
  cursor: pointer;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-grid label > span {
  margin-bottom: 7px;
  display: block;
  font-size: 0.49rem;
  font-weight: 700;
}

.field-wide { grid-column: 1 / -1; }

.field-grid input,
.field-grid textarea,
.prefixed-input,
.suffixed-input {
  width: 100%;
  border: 1px solid #d2d2cb;
  border-radius: 12px;
  background: white;
  outline: 0;
  font-size: 0.55rem;
}

.field-grid input {
  min-height: 43px;
  padding: 0 12px;
}

.field-grid textarea {
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.field-grid input:focus,
.field-grid textarea:focus,
.prefixed-input:focus-within,
.suffixed-input:focus-within {
  border-color: #809329;
  box-shadow: 0 0 0 3px rgba(183, 217, 50, 0.18);
}

.field-grid label > small {
  margin-top: 5px;
  display: block;
  color: var(--muted);
  font-size: 0.4rem;
}

.prefixed-input,
.suffixed-input {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.prefixed-input i,
.suffixed-input i {
  padding: 0 0 0 12px;
  color: var(--muted);
  font-size: 0.5rem;
  font-style: normal;
}

.suffixed-input i {
  padding: 0 12px 0 0;
  white-space: nowrap;
}

.prefixed-input input,
.suffixed-input input {
  min-width: 0;
  border: 0;
  box-shadow: none;
}

.form-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.quiet-button,
.save-button {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.quiet-button { border: 1px solid var(--line); background: white; }
.save-button { border: 1px solid var(--ink); background: var(--ink); color: white; }

.cover-uploader {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  margin-bottom: 21px;
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f6f2;
  cursor: pointer;
}

.cover-uploader img {
  height: 122px;
  object-fit: cover;
}

.cover-uploader strong,
.cover-uploader small { display: block; }
.cover-uploader strong { font-size: 0.55rem; }
.cover-uploader small { margin-top: 5px; color: var(--muted); font-size: 0.42rem; }
.cover-uploader input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.business-tools {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.business-tools > div {
  padding: 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f6f2;
}

.business-tools span {
  grid-row: 1 / 3;
  color: #6d8022;
  font-size: 1.2rem;
  font-weight: 600;
}

.business-tools strong { font-size: 0.5rem; }
.business-tools a { color: var(--muted); font-size: 0.42rem; text-decoration: none; }

.profile-toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 105px;
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: 180ms ease;
}

.profile-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 820px) {
  .profile-main {
    width: calc(100% - 24px);
    padding-top: 31px;
  }

  .profile-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-title h1 { font-size: clamp(2.7rem, 14vw, 4.6rem); }
  .profile-toggle { margin: 25px 0 16px; }

  .profile-panel { grid-template-columns: 1fr; }
  .profile-preview { position: static; }
}

@media (max-width: 560px) {
  .profile-form { padding: 18px 14px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .profile-photo-row { grid-template-columns: 42px 1fr; }
  .profile-photo-row > span { width: 42px; height: 42px; }
  .profile-photo-row button { grid-column: 2; justify-self: start; }
  .form-actions { flex-direction: column-reverse; }
  .quiet-button, .save-button { width: 100%; }
  .cover-uploader { grid-template-columns: 1fr; }
  .cover-uploader img { width: 100%; }
  .cover-uploader > span { padding: 0 13px 14px; }
  .business-tools { grid-template-columns: 1fr; }
}
