.weekly-settings { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 14px; }
.weekly-settings h3 { font-size: 16px; margin: 0 0 12px; }
.weekly-settings .setting-row { font-size: 13px; }
.weekly-settings textarea { width: 100%; min-height: 74px; padding: 10px; font: inherit; border: 1px solid #cfd6df; border-radius: 10px; resize: vertical; }
.weekly-export { grid-column: 1 / -1; }
.weekly-export p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.weekly-unit { margin-top: 10px; }
.weekly-export button:disabled { opacity: .5; cursor: not-allowed; }
.print-area.template-weekly { display: grid; min-width: 0; width: 100%; gap: 20px; justify-content: stretch; }
.template-weekly .weekly-page { display: block; width: 100%; max-width: 1100px; height: auto; padding: 0; margin: 0 auto; transform: none; }
.weekly-page canvas { display: block; width: 100%; height: auto; }
@media print {
  body.weekly-print [data-mobile-panel].no-print { display: none !important; }
  .print-area.template-weekly { display: block; }
  .template-weekly .weekly-page { display: flex !important; align-items: center; justify-content: center; width: 11in; height: 8.5in; max-width: none; padding: 0; overflow: hidden; }
  .template-weekly.paper-a4 .weekly-page { width: 297mm; height: 210mm; }
  .weekly-page canvas { width: 100%; height: 100%; object-fit: contain; }
}

.weekly-page { position: relative; }
.weekly-swap-layer { position: absolute; inset: 0; pointer-events: none; }
.weekly-swap-item { position: absolute; pointer-events: auto; background: transparent; border: 2px solid transparent; padding: 0; border-radius: 6px; cursor: grab; touch-action: none; }
.weekly-swap-item:hover, .weekly-swap-item:focus-visible { border-color: #15803d; background: rgba(21,128,61,.05); outline: none; }
.weekly-swap-item.dragging { cursor: grabbing; border: 2px dashed #15803d; }
.weekly-drop-target { position: absolute; border: 3px solid #15803d; background: rgba(21,128,61,.15); border-radius: 6px; box-sizing: border-box; z-index: 2; }
.weekly-reorder-help { color: var(--muted); font-size: 13px; line-height: 1.5; }
@media print { .weekly-swap-layer { display: none !important; } }

.weekly-photo-editor { border-top: 1px solid #dce3e8; padding-top: 10px; }
.weekly-photo-editor summary { cursor: pointer; font-weight: 700; color: #166534; margin-bottom: 10px; }
.weekly-photo-editor small { display: block; color: var(--muted); line-height: 1.5; margin-top: 8px; }
.weekly-photo-control { display: grid; grid-template-columns: 70px minmax(0,1fr) 42px; align-items: center; gap: 8px; margin: 10px 0; font-size: 13px; }
.weekly-photo-control input { width: 100%; padding: 0; accent-color: #15803d; }
.weekly-photo-control output { text-align: right; }

.weekly-preview-editor { position: sticky; top: 8px; z-index: 5; background: #fff; border: 1px solid #cddfd2; border-radius: 12px; padding: 12px 16px; margin: 12px 0; box-shadow: 0 3px 12px #0001; }
.weekly-preview-editor > label { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.weekly-preview-editor select { flex: 1; min-width: 0; padding: 6px; }
.weekly-preview-sliders { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.weekly-preview-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.weekly-preview-actions small { color: var(--muted); }
@media(max-width: 700px) { .weekly-preview-editor { position: static; } .weekly-preview-sliders { grid-template-columns: 1fr; gap: 0; } }
@media print { .weekly-preview-editor { display: none !important; } }

/* Desktop: the inspector occupies its own column, never covering the canvas. */
@media screen and (min-width: 1100px) {
  body.weekly-print .sale-shell { max-width: 1840px; }
  body.weekly-print .preview-section { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px 20px; align-items: start; overflow: visible; min-width: 0; }
  body.weekly-print .preview-heading { grid-column: 1 / -1; }
  body.weekly-print .weekly-preview-editor { grid-column: 2; grid-row: 2; margin: 0; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 18px; }
  body.weekly-print .print-area.template-weekly { grid-column: 1; grid-row: 2; min-width: 0; }
  body.weekly-print .weekly-preview-sliders { grid-template-columns: 1fr; gap: 6px; margin: 18px 0; }
  body.weekly-print .weekly-preview-editor > label { display: grid; gap: 8px; }
  body.weekly-print .weekly-preview-actions { display: grid; gap: 16px; }
  body.weekly-print .weekly-preview-actions select { width: 100%; margin-top: 6px; }
  body.weekly-print .weekly-preview-editor input[type=range] { min-height: 28px; cursor: pointer; }
  body.weekly-print .weekly-preview-editor small { line-height: 1.6; }
  body.weekly-print .weekly-page { max-width: none; box-shadow: 0 4px 20px #17203316; }
}
.weekly-swap-item:hover { background: transparent; border-color: #86b99a; }
.weekly-swap-item.photo-selected { border-color: #15803d; background: transparent; }
.weekly-swap-item:focus-visible { outline: 2px solid #15803d; outline-offset: -5px; background: transparent; }

.weekly-print-feedback { grid-column: 1 / -1; color: #a91919; font-size: 14px; line-height: 1.6; margin: 10px 0; }
