.posting-dialog {
  width: min(850px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: clamp(12px, 3vw, 22px);
  overflow: auto;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(27, 52, 31, 0.98), rgba(6, 18, 10, 0.985));
  color: #f1dfb7;
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.62), inset 0 1px rgba(255, 239, 200, 0.08);
}

.posting-dialog::backdrop { background: rgba(2, 8, 4, 0.7); backdrop-filter: blur(5px); }
.posting-dialog .posting-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.posting-dialog .posting-head h2 { margin: 0 0 16px; }
.posting-dialog .posting-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.posting-dialog button {
  color: inherit;
  font: inherit;
  border: 0;
  border-radius: 7px;
  background: var(--control-surface, rgba(233, 215, 174, 0.08));
  padding: 8px 11px;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 239, 200, 0.055);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.posting-dialog button:hover, .posting-dialog button:focus-visible { color: #fff0ca; background: rgba(233, 215, 174, 0.18); transform: translateY(-1px); }
.posting-dialog button:disabled { opacity: 0.55; cursor: wait; }
.posting-dialog .posting-tabs button {
  position: relative;
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 104px;
  padding: 15px 16px 17px;
  overflow: hidden;
  text-align: left;
  white-space: normal;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(236, 219, 181, 0.095), rgba(25, 51, 30, 0.34));
}
.posting-dialog .posting-tabs button::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #a86136, #e0bb73, #a86136);
  content: "";
  opacity: 0;
  transform: scaleX(0.25);
  transition: opacity 160ms ease, transform 160ms ease;
}
.posting-dialog .posting-tabs button:hover,
.posting-dialog .posting-tabs button:focus-visible {
  background: rgba(236, 219, 181, 0.13);
}
.posting-dialog .posting-tabs .is-active {
  background:
    linear-gradient(145deg, rgba(185, 109, 55, 0.3), rgba(69, 39, 23, 0.24)),
    rgba(236, 219, 181, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 240, 202, 0.08);
}
.posting-dialog .posting-tabs .is-active::after {
  opacity: 1;
  transform: scaleX(1);
}
.posting-tab-title {
  color: #f4dfad;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.08;
}
.posting-tab-copy {
  color: rgba(233, 215, 174, 0.75);
  font-size: 0.84rem;
  line-height: 1.35;
}
.posting-dialog .posting-tabs .is-active .posting-tab-title { color: #fff0c7; }
.posting-dialog .posting-panel { margin: 0; padding: 0; background: none; }
.posting-dialog .posting-panel[hidden] { display: none; }
.posting-dialog form { display: grid; gap: 12px; }
.posting-dialog form > button { justify-self: start; }
.posting-dialog label { display: block; min-width: 0; }
.posting-dialog input, .posting-dialog select, .posting-dialog textarea { max-width: 100%; }
.posting-dialog input[type="file"] { width: 100%; padding: 5px 0; background: transparent; font: inherit; font-size: 0.9rem; }
.posting-dialog input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 7px;
  color: #e9d7ae;
  background: var(--control-surface, rgba(233, 215, 174, 0.08));
  padding: 8px 11px;
  margin-right: 10px;
  font: inherit;
  cursor: pointer;
}
.posting-dialog input[type="file"]::file-selector-button:hover { background: rgba(233, 215, 174, 0.18); }
.posting-dialog textarea { min-height: 78px; }
.posting-drafts { display: grid; gap: 12px; }
.posting-draft { min-width: 0; padding: 13px; display: grid; gap: 10px; border-radius: 11px; background: rgba(10, 28, 16, 0.7); box-shadow: inset 0 1px rgba(255, 239, 200, 0.05); }
.posting-seed-batch-draft { gap: 12px; }
.posting-seedlings { display: grid; gap: 10px; padding-top: 2px; }
.posting-seedlings .posting-drafts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.posting-seedlings .posting-draft { padding: 10px; background: rgba(233, 215, 174, 0.055); }
.posting-draft-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.posting-draft-head h3 { margin: 0; }
.posting-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.posting-previews,
.media-manager-list { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
.media-manager-item { flex: 0 0 118px; display: grid; gap: 5px; align-content: start; }
.media-manager-item img,
.media-manager-item video { display: block; width: 118px; height: 118px; object-fit: contain; background: #090d09; border-radius: 9px; box-shadow: 0 9px 22px rgba(0, 0, 0, 0.26); }
.media-manager-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 4px; }
.media-manager-actions button { min-width: 0; padding: 5px 6px; font-size: 0.8rem; }
.listing-edit-seedling-photo { display: block; width: min(100%, 260px); height: auto; max-height: 300px; object-fit: contain; background: #090d09; border-radius: 9px; }
.media-crop-dialog { width: min(94vw, 540px); border: 0; border-radius: 14px; padding: 16px; color: #f1dfb7; background: linear-gradient(145deg, rgba(27, 52, 31, 0.99), rgba(6, 18, 10, 0.995)); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62); }
.media-crop-dialog::backdrop { background: rgba(2, 8, 4, 0.74); backdrop-filter: blur(5px); }
.media-crop-stage { width: 100%; aspect-ratio: 1; overflow: hidden; background: #050805; touch-action: none; border-radius: 10px; box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.45); }
.media-crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.media-crop-stage canvas:active { cursor: grabbing; }
.media-crop-dialog input[type="range"] { width: 100%; }
.posting-status { min-height: 1.4em; margin: 8px 0 0; }
@media (max-width: 560px) {
  .posting-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 12px; }
  .posting-fields { grid-template-columns: 1fr; }
  .posting-dialog .posting-tabs { grid-template-columns: 1fr; gap: 7px; margin-bottom: 14px; }
  .posting-dialog .posting-tabs button { min-height: 72px; padding: 11px 13px 13px; }
  .posting-tab-title { font-size: 1rem; }
  .posting-tab-copy { font-size: 0.78rem; }
}
