/* === Reset i podstawy (spojne z editor.css) === */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.primary {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

button.success {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

button.danger {
  background: #ffffff;
  color: #b91c1c;
  border-color: #fecaca;
}

button.danger:hover {
  background: #fef2f2;
}

button.ghost {
  background: transparent;
}

input[type="text"],
input[type="url"],
input[type="search"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

h1,
h2,
h3 {
  margin: 0 0 8px;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

.subtle {
  margin: 0;
  color: #6b7280;
  line-height: 1.5;
  font-size: 14px;
}

.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
  margin-bottom: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-header h2 {
  margin: 0;
}

/* === Wyszukiwarka Tary === */
.search-bar {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.search-bar input {
  flex: 1;
}

.search-results {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.search-results:empty {
  display: none;
}

.search-results .search-hint {
  grid-column: 1 / -1;
  color: #6b7280;
  font-size: 14px;
  padding: 8px 4px;
}

.search-result-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.search-result-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #e5e7eb;
}

.search-result-card .title {
  font-size: 13px;
  line-height: 1.35;
  color: #111827;
  font-weight: 600;
}

.search-result-card .meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* === Lista draftow === */
.drafts-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.drafts-toolbar .filter-group {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  background: #f9fafb;
}

.drafts-toolbar .filter-button {
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.drafts-toolbar .filter-button.is-active {
  background: #111827;
  color: #ffffff;
}

.drafts-toolbar .count {
  margin-left: auto;
  color: #6b7280;
  font-size: 13px;
}

.drafts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.empty-state.drafts-panel-empty {
  display: none;
}

.empty-state.drafts-panel-empty.is-visible {
  display: block;
}

.empty-state {
  display: none;
  padding: 32px 16px;
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
}

.draft-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

@media (hover: hover) {
  .draft-card:hover {
    border-color: #0f766e;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12);
    transform: translateY(-1px);
  }
}

.draft-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
}

.draft-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.draft-card-thumb .thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #9ca3af;
  font-size: 13px;
}

.draft-card-status {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.draft-card-status.status-draft {
  background: rgba(55, 65, 81, 0.92);
  color: #ffffff;
}

.draft-card-status.status-sent {
  background: rgba(15, 118, 110, 0.92);
  color: #ffffff;
}

.draft-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.draft-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #6b7280;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 11px;
  white-space: nowrap;
}

.chip.chip-channel {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.chip.chip-tag {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.chip.chip-state {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.draft-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #9ca3af;
}

.draft-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.draft-card-actions button {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.draft-card-actions .open-button {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

/* === Toast (kopia z editor.css dla spojnosci) === */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100% - 32px);
  pointer-events: none;
}

.toast {
  background: #111827;
  color: #ffffff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.toast-success {
  background: #0f766e;
}

.toast.toast-error {
  background: #b91c1c;
}

.toast.toast-info {
  background: #1f2937;
}

/* === Modal (powielenie / potwierdzenie) === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.modal p {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.modal label {
  display: block;
  margin-bottom: 12px;
}

.modal label span {
  display: block;
  font-size: 13px;
  color: #374151;
  margin-bottom: 4px;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* === Wizard: stepper === */
.wizard-page {
  padding-bottom: 96px;
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.wizard-header .back-link {
  font-size: 13px;
  color: #6b7280;
}

.wizard-header .draft-id {
  font-size: 11px;
  color: #9ca3af;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.wizard-stepper {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  text-align: left;
  cursor: pointer;
  color: #6b7280;
}

.wizard-step .step-num {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #9ca3af;
}

.wizard-step .step-name {
  font-size: 13px;
  font-weight: 600;
}

.wizard-step.is-current {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.wizard-step.is-current .step-num {
  color: #d1d5db;
}

.wizard-step.is-done {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.wizard-step.is-done .step-num {
  color: #047857;
}

.wizard-step.is-locked {
  cursor: not-allowed;
  opacity: 0.6;
}

/* === Wizard: sticky bottom bar === */
.wizard-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.wizard-bottom-bar .save-status {
  font-size: 12px;
  color: #6b7280;
  flex: 1;
  text-align: center;
}

.wizard-bottom-bar button {
  min-width: 110px;
}

/* === Wizard: form === */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row label {
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.form-row .hint {
  font-size: 12px;
  color: #6b7280;
}

.wizard-checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  cursor: pointer;
}

.wizard-checkbox-label input {
  margin-top: 3px;
  flex-shrink: 0;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-tile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.option-tile:hover {
  border-color: #2563eb;
}

.option-tile.is-selected {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.option-tile input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.option-tile .tile-body {
  flex: 1;
}

.option-tile .tile-title {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.option-tile .tile-desc {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* === Wizard: tagi (chips) === */
.tag-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tag-input-row input {
  flex: 1;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: all 120ms ease;
}

.tag-chip.is-selected {
  background: #ecfdf5;
  border-color: #0f766e;
  color: #065f46;
  font-weight: 600;
}

.tag-chip:hover {
  border-color: #0f766e;
}

.tag-chip .remove {
  font-size: 12px;
  color: #b91c1c;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

/* === Wizard: warianty === */
.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.variant-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.variant-card:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.variant-card.is-unavailable {
  opacity: 0.92;
  border-color: #fecaca;
  cursor: pointer;
}

.variant-card .var-title {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
}

.variant-card .var-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.variant-card .var-price {
  font-weight: 700;
  color: #0f766e;
  font-size: 14px;
}

/* === Wizard: galeria zdjec === */
.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.wizard-image-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wizard-image-cell--payload-overflow .image-tile {
  outline: 2px solid #d97706;
  outline-offset: 2px;
  border-radius: 10px;
}

.wizard-image-select-label {
  justify-content: center;
}

.wizard-thumb-kind-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  padding: 2px 6px;
  border-radius: 6px;
  pointer-events: none;
}

.wizard-badge-focus-btn.tiny {
  font-size: 11px;
  padding: 3px 6px;
  width: 100%;
}

.wizard-image-meta-row {
  display: flex;
  justify-content: center;
}

.image-tile.is-badge-focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.chip-accent {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.wizard-gallery-hint {
  line-height: 1.45;
}

.wizard-mass-badges-details {
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  padding: 8px 10px;
  margin-top: 4px;
  background: #fafafa;
}

.wizard-mass-badges-details > summary {
  cursor: pointer;
  font-weight: 600;
  color: #1e293b;
}

.wizard-mass-groups details {
  margin-top: 8px;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.wizard-mass-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

button.ghost.small {
  font-size: 12px;
  padding: 6px 10px;
}

.wizard-overlay-main-details summary {
  font-weight: 600;
  cursor: pointer;
}

.wizard-badge-ai-plan-details {
  margin-bottom: 12px;
  border-radius: 10px;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
}

#wizard-badge-plan-list {
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.collage-pick-label {
  font-size: 11px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0 2px;
}

.collage-wizard-block {
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
  margin-top: 4px;
}

.media-step-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.media-step-sticky {
  position: sticky;
  top: 8px;
  z-index: 5;
  border-color: #dbeafe;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.media-step-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 10px;
}

.media-step-summary-item {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 72px;
}

.media-step-summary-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 600;
}

.media-step-summary-item strong {
  font-size: 14px;
  color: #111827;
}

.media-step-summary-hint {
  font-size: 12px;
  color: #64748b;
}

.media-step-summary-image-box {
  width: 100%;
  min-height: 66px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-step-summary-image-box img {
  width: 100%;
  height: 66px;
  object-fit: cover;
  display: block;
}

.media-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.media-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.media-card-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #111827;
}

.media-kpi-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.media-card-collage .collage-wizard-actions {
  margin: 8px 0 10px;
}

.media-card-overlay .form-row {
  margin-bottom: 10px;
}

.collage-wizard-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.collage-wizard-thumb {
  max-width: 100%;
  max-height: min(360px, 55vh);
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  display: block;
}

.image-tile {
  position: relative;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  aspect-ratio: 1 / 1;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.image-tile.is-dragging {
  opacity: 0.45;
}

.image-tile.is-selected {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18), 0 4px 14px rgba(15, 118, 110, 0.12);
}

.image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-tile .order-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0f766e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-tile.is-primary::after {
  content: "GLOWNE";
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: #111827;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

/* === Wizard: live preview etykiety === */
.overlay-preview {
  display: flex;
  justify-content: center;
  margin: 14px 0;
}

.overlay-preview img,
.overlay-preview canvas {
  width: auto;
  height: auto;
  max-width: min(420px, 92vw);
  max-height: min(420px, 50vh);
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.overlay-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.overlay-controls .wizard-variant-explainer {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  line-height: 1.45;
}

.wizard-ai-plan-help {
  margin: 8px 0 0;
  line-height: 1.45;
}

.wizard-badge-plan-intro {
  margin: 0 0 10px;
  line-height: 1.45;
}

.wizard-badge-plan-advanced {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
}

.wizard-badge-plan-advanced summary {
  cursor: pointer;
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
}

.wizard-overlay-highlights-row {
  margin-top: 10px;
}

.wizard-overlay-gallery-row {
  margin-top: 12px;
}

/* === Wizard: spinner === */
.wizard-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 20px;
}

.spinner-circle {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.wizard-spinner .spinner-text {
  color: #374151;
  font-size: 14px;
  text-align: center;
}

/* === Mobile === */
@media (max-width: 720px) {
  .page {
    padding: 14px;
  }

  .page-header {
    flex-direction: column;
    gap: 8px;
  }

  h1 {
    font-size: 22px;
  }

  .panel {
    padding: 14px;
    border-radius: 14px;
  }

  .search-bar {
    flex-direction: column;
    gap: 8px;
  }

  .search-bar button {
    width: 100%;
  }

  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .search-result-card {
    padding: 8px;
  }

  .search-result-card .title {
    font-size: 12px;
  }

  .drafts-list {
    grid-template-columns: 1fr;
  }

  .drafts-toolbar {
    gap: 6px;
  }

  .drafts-toolbar .count {
    width: 100%;
    margin-left: 0;
    text-align: right;
  }

  .wizard-stepper {
    gap: 3px;
  }

  .wizard-step {
    padding: 8px 6px;
  }

  .wizard-step .step-name {
    font-size: 11px;
  }

  .wizard-bottom-bar {
    padding: 10px 14px;
  }

  .wizard-bottom-bar button {
    min-width: 90px;
    padding: 10px 12px;
  }

  .wizard-bottom-bar .save-status {
    font-size: 11px;
  }

  .variants-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .images-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .overlay-controls {
    grid-template-columns: 1fr 1fr;
  }

  .media-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .media-step-sticky {
    position: static;
  }

  .media-step-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Krok 5: zapis do Base */
.wizard-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.wizard-save-actions select {
  flex: 1;
  min-width: 200px;
}

.wizard-body-excerpt {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
  white-space: pre-wrap;
}

.wizard-editor-link {
  display: inline-block;
  font-weight: 600;
  color: #0f766e;
  text-decoration: none;
}

.wizard-editor-link:hover {
  text-decoration: underline;
}

.wizard-save-result {
  margin-top: 12px;
}

.wizard-save-ok {
  color: #0f766e !important;
}

.wizard-save-err {
  color: #b91c1c !important;
}

/* === Summary tiles (klikalne) === */
button.option-tile.wizard-summary-tile {
  text-align: left;
  width: 100%;
  cursor: pointer;
  border-radius: 12px;
}

button.option-tile.wizard-summary-tile:hover {
  border-color: #0f766e;
  box-shadow: 0 2px 10px rgba(15, 118, 110, 0.12);
}

.tile-action-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
}

.wizard-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.wizard-regenerate-row {
  padding-top: 4px;
}

/* Tagi vs BaseLinker */
.tag-chip-bl-sync {
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.45);
}

.tag-chip-bl-warn {
  box-shadow: inset 0 0 0 2px rgba(180, 83, 9, 0.55);
}

.tag-bl-hint {
  color: #4b5563;
}

/* Podgląd HTML krok 5 */
.wizard-preview-html-frame {
  width: 100%;
  min-height: 320px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.wizard-payload-check-result {
  margin-top: 10px;
}

.wizard-overlay-advanced {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  background: #fafafa;
}

.wizard-overlay-advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: #374151;
}

.collage-layout-row select {
  margin-top: 6px;
  max-width: 320px;
}

/* Spójne z editor.css — ostrzeżenia polityki tytułu Allegro (krok 5) */
.wizard-allegro-title-issues.has-issues {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wizard-allegro-title-issues .channel-title-issue {
  font-size: 0.85rem;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #78350f;
}

.wizard-allegro-title-issues .channel-title-issue--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
}

.allegro-photo-checklist {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 14px;
  background: #fafafa;
}

.allegro-photo-checklist summary {
  cursor: pointer;
  font-weight: 600;
  color: #374151;
}

.allegro-photo-checklist-intro {
  margin: 8px 0 6px;
  font-size: 0.9rem;
  color: #4b5563;
}

.allegro-photo-checklist ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #374151;
}
