/* Logo Carousel Generator only. Every rule is scoped to .lcg (the tool grid). */
.lcg [hidden] { display: none !important; }
.lcg .center-stage { gap: 0; }

/* Upload zone: full size first, then a slim bar so phones can keep adding files */
.lcg .upload-zone { margin-bottom: 16px; }
.lcg .upload-zone.is-compact { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; }
.lcg .upload-zone.is-compact .upload-icon { width: 38px; height: 38px; margin: 0; flex: 0 0 auto; }
.lcg .upload-zone.is-compact .upload-title { font-size: 15px; margin: 0; }
.lcg .upload-zone.is-compact .upload-subtitle { margin: 0; font-size: 12.5px; }
.lcg .upload-zone.is-compact .upload-hint { display: none; }
.lcg .upload-zone.is-compact > div:not(.upload-icon) { min-width: 0; }

/* Preview */
.lcg .stage-card { margin-bottom: 16px; }
.lcg-preview-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 16px; background: #fff; border-bottom: 1px solid rgba(17,18,23,.10); font-size: 12.5px; color: #334155; }
.lcg-preview-tools .seg { width: auto; background: #eef2f7; border-color: rgba(17,18,23,.12); }
.lcg-preview-tools .seg button, .lcg-tabs button { color: #334155; min-height: 34px; padding: 6px 12px; }
.lcg-preview-tools .seg button:not(.active):hover, .lcg-tabs button:not(.active):hover { color: #111827; background: #e2e8f0; }
.lcg-preview-tools .seg button.active, .lcg-tabs button.active { color: #fff; }
.lcg-check { display: inline-flex; align-items: center; gap: 8px; color: #334155; font-weight: 600; cursor: pointer; }
.lcg-check input { width: 18px; height: 18px; }
.lcg-stage { position: relative; padding: 22px 0; min-height: 170px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; background: #fff; color: #111827; }
.lcg-stage[data-surface="dark"] { background: #0f172a; color: #f8fafc; }
.lcg-stage-inner { width: 100%; margin: 0 auto; }
.lcg-stage.lcg-phone .lcg-stage-inner { max-width: 375px; outline: 1px dashed rgba(100,116,139,.55); outline-offset: 0; }
.lcg-placeholder { margin: 0; padding: 24px 18px; text-align: center; font-size: 14px; color: #64748b; }
.lcg-stage[data-surface="dark"] .lcg-placeholder { color: #cbd5e1; }
.lcg-readout { margin: 0; padding: 10px 16px; font-size: 12.5px; line-height: 1.6; color: #334155; background: #f8fafc; border-top: 1px solid rgba(17,18,23,.10); font-variant-numeric: tabular-nums; }
.lcg-readout:empty { display: none; }
.lcg-status { margin: -6px 0 14px; font-size: 12.5px; line-height: 1.6; color: #334155; }

/* Logo list */
.lcg-list { list-style: none; margin: 0; padding: 12px; display: grid; gap: 10px; background: #f8fafc; }
.lcg-item { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 10px 12px; align-items: start; padding: 12px; background: #fff; border: 1px solid rgba(17,18,23,.12); border-radius: 10px; color: #172033; }
.lcg-item.is-failed { border-color: #fecaca; background: #fef2f2; }
.lcg-thumb { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: linear-gradient(45deg,#e2e8f0 25%,transparent 25%),linear-gradient(-45deg,#e2e8f0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e2e8f0 75%),linear-gradient(-45deg,transparent 75%,#e2e8f0 75%),#f8fafc; background-size: 12px 12px; background-position: 0 0,0 6px,6px -6px,-6px 0; }
.lcg-thumb img { max-width: 56px; max-height: 56px; width: auto; height: auto; }
.lcg-meta { min-width: 0; }
.lcg-meta strong { display: block; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; color: #111827; }
.lcg-meta small { display: block; font-size: 12px; line-height: 1.55; color: #475569; margin-top: 2px; }
.lcg-meta .lcg-flag { color: #92400e; }
.lcg-meta .lcg-flag:empty { display: none; }
.lcg-actions { display: flex; gap: 6px; }
.lcg-actions button { min-width: 40px; height: 40px; border: 1px solid #cbd5e1; border-radius: 7px; background: #f8fafc; color: #172033; font-size: 17px; line-height: 1; cursor: pointer; }
.lcg-actions button:hover:not(:disabled) { background: #eef2f7; border-color: #94a3b8; }
.lcg-actions button:disabled { opacity: .45; cursor: not-allowed; }
.lcg-actions .lcg-remove { color: #b91c1c; }
.lcg-fields { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lcg-field label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: #334155; }
.lcg .lcg-field input { padding: 9px 11px; font-size: 14px; background: #fff; color: #111827; border: 1px solid #cbd5e1; border-radius: 6px; }
.lcg .lcg-field input:focus { background: #fff; border-color: #2563eb; }
.lcg .lcg-field input[aria-invalid="true"] { border-color: #dc2626; background: #fef2f2; }
.lcg-err { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: #b91c1c; }
.lcg-err:empty { display: none; }

/* Output (full width under the workspace) */
.lcg-output { grid-column: 1 / -1; margin-top: 10px; padding: 18px; background: #d9dee6; border-radius: 10px; min-width: 0; }
.lcg-output .stage-card { margin-bottom: 0; }
.lcg-out-body { padding: 16px; background: #fff; }
.lcg-tabs { width: auto; margin-bottom: 14px; background: #eef2f7; border-color: rgba(17,18,23,.12); }
.lcg-note { margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: #334155; }
.lcg-note code { font-size: 12.5px; background: #eef2f7; padding: 1px 5px; border-radius: 4px; }
.lcg-code-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: #334155; }
.lcg .lcg-code { width: 100%; min-height: 240px; max-height: 420px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.55; white-space: pre; overflow: auto; resize: vertical; background: #0f172a; color: #e2e8f0; border: 1px solid #1e293b; border-radius: 8px; }
.lcg .lcg-code:focus { background: #0f172a; }
.lcg-size { margin: 0 0 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; border-radius: 8px; background: #f0fdf4; color: #14532d; border: 1px solid #bbf7d0; }
.lcg-size.is-warn { background: #fffbeb; color: #78350f; border-color: #fde68a; }
.lcg-size.is-bad { background: #fef2f2; color: #7f1d1d; border-color: #fecaca; }
.lcg-out-body .action-buttons { margin: 12px 0 0; }

/* Aside */
.lcg .tool-aside .help-note { font-size: 12px; line-height: 1.6; color: rgba(255,255,255,.72); }
.lcg .tool-aside .help-note b { color: #fff; }
.lcg .tool-aside .checkbox-group { margin-top: 10px; }
.lcg .tool-aside .seg button { min-height: 38px; }
.lcg .tool-aside .lcg-err { color: #fca5a5; }
.lcg .tool-aside .input-group + .input-group { margin-top: 14px; }
.lcg .tool-aside .lcg-sub { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.5; color: rgba(255,255,255,.58); }
.lcg-reset { margin-top: 16px; width: 100%; color: rgba(255,255,255,.8) !important; border-color: rgba(255,255,255,.18) !important; }

/* Visible keyboard focus */
.lcg button:focus-visible, .lcg input:focus-visible, .lcg select:focus-visible, .lcg textarea:focus-visible,
.lcg .upload-zone:focus-visible, .lcg .settings-header:focus-visible, .lcg-stage :focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.lcg .tool-aside button:focus-visible, .lcg .tool-aside input:focus-visible, .lcg .tool-aside select:focus-visible, .lcg .tool-aside .settings-header:focus-visible { outline-color: #93c5fd; }

@media (max-width: 1024px) {
  .lcg-output { padding: 12px; }
}
@media (max-width: 640px) {
  .lcg-item { grid-template-columns: 56px minmax(0,1fr); }
  .lcg-thumb { width: 56px; height: 56px; }
  .lcg-thumb img { max-width: 48px; max-height: 48px; }
  .lcg-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .lcg-fields { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .lcg-preview-tools { padding: 10px 12px; }
  .lcg-list { padding: 8px; }
  .lcg-out-body { padding: 12px; }
  .lcg .lcg-code { min-height: 200px; font-size: 12px; }
}
