.edit-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(24, 200, 148, 0.12), transparent 34%),
    #f6faf8;
}

.edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(20px, 5vw, 64px);
  background: var(--deep);
  box-shadow: 0 10px 28px rgba(4, 61, 48, 0.2);
}

.edit-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logout-btn,
.back-link,
.primary-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #d9fff1;
  background: transparent;
  border: 1px solid rgba(24, 200, 148, 0.55);
  border-radius: 8px;
  text-decoration: none;
}

.primary-link {
  align-items: center;
  width: fit-content;
  color: #fff;
  background: var(--mint-dark);
}

.edit-main {
  display: grid;
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
  padding: 34px 20px 54px;
}

.edit-intro h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
}

.edit-form,
.edit-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.edit-form input,
.edit-form select {
  height: 46px;
}

.edit-form textarea {
  min-height: 160px;
  padding: 12px;
  font-size: 18px;
  line-height: 1.55;
}

.photo-upload {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.photo-preview {
  position: relative;
  display: grid;
  width: 132px;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  color: var(--mint-dark);
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-weight: 400;
}

.photo-preview img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview.has-photo img {
  display: block;
}

.photo-preview.has-photo span {
  display: none;
}

.photo-upload small {
  color: var(--muted);
  font-weight: 400;
}

.gallery-upload {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gallery-upload h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 18px;
}

.gallery-upload p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
}

.gallery-preview img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
}

.choice-row input {
  width: auto;
  height: auto;
}

fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 6px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 400;
}

.address-check {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.address-check p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.address-map {
  min-height: 260px;
  overflow: hidden;
  background: #edf4ef;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.address-box.confirmed {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(24, 200, 148, 0.13);
}

.edit-message {
  margin: 0;
  color: var(--mint-dark);
  line-height: 1.5;
}

.edit-message.is-error {
  color: #b33838;
}

@media (max-width: 720px) {
  .edit-header,
  .edit-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
