.publish-page {
  padding: 48px 0 80px;
}

/* ── Auth gate buttons ── */
.auth-gate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ── Two-column layout ── */
.publish-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 36px;
}

.publish-col {
  display: flex;
  flex-direction: column;
}

.publish-field-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.publish-input {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1.5px solid rgba(0,0,0,0.12);
  font-size: 17px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}

.publish-input:focus { border-bottom-color: var(--text); }
.publish-input::placeholder { color: #C7C7CC; }

.publish-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Drop zone ── */
.drop-zone {
  border: 1.5px dashed rgba(0,0,0,0.14);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  background: rgba(0,0,0,0.018);
  position: relative;
  margin-top: 4px;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--text);
  background: rgba(0,0,0,0.03);
}

.drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.drop-sub {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ── File preview ── */
.file-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.file-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.04);
}

.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(0,0,0,0.55);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.file-preview-item:hover .file-preview-remove { opacity: 1; }

.file-count-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ── Progress ── */
.upload-progress { margin-top: 20px; }

.progress-bar-wrap {
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}

.progress-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Alert ── */
.form-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.45;
  display: none;
}

.form-alert.error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid rgba(185,28,28,0.15);
  display: block;
}

.form-alert.success {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid rgba(22,101,52,0.15);
  display: block;
}

/* ── Actions ── */
.publish-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 32px;
}

.btn-cancel {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.btn-cancel:hover {
  border-color: rgba(0,0,0,0.22);
  color: var(--text);
}

.btn-publish {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: var(--text);
  color: white;
  transition: opacity 0.18s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-publish:hover { opacity: 0.8; }
.btn-publish:disabled { opacity: 0.35; cursor: default; }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── User info bar ── */
.user-info-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  font-size: 15px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text);
  color: white;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info-name { font-weight: 600; }
.user-info-email { font-size: 13px; color: var(--text-secondary); }

.user-info-right {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-secondary);
}

.user-info-right a { color: var(--text); font-weight: 500; }

@media (max-width: 768px) {
  .publish-layout { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .publish-page { padding: 88px 24px 60px; }
}
