/* === LOGO Cropper styles === */

[hidden] { display: none !important; }

.logo-page { max-width: 1280px; margin: 0 auto; padding: 0 64px 80px; }

.crumb {
  display: flex; align-items: center; gap: 8px;
  padding-top: 16px;
  font-size: 13px; color: var(--fg-muted);
}
.crumb a { color: var(--fg-muted); }
.crumb a:hover { color: var(--accent-dark); }
.crumb .sep { opacity: .5; }
.crumb .here { color: var(--fg-secondary); font-weight: 500; }

.logo-head { padding: 24px 0 32px; }
.logo-head h1 {
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.logo-head p { color: var(--fg-secondary); font-size: 16px; line-height: 1.55; max-width: 720px; margin: 0; }

.workspace { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }

.canvas-col { display: flex; flex-direction: column; gap: 16px; }

.stage {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.dropzone {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--fg-muted);
  border: 2px dashed transparent;
  transition: background .2s ease, border-color .2s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-drag {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.dropzone strong { font-size: 15px; font-weight: 600; color: var(--fg-secondary); }
.dropzone span { font-size: 13px; color: var(--fg-muted); }

.cropper { position: relative; width: 100%; height: 100%; user-select: none; }
.cropper-img {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%; max-height: 100%;
  pointer-events: none;
  -webkit-user-drag: none; user-select: none;
}
.crop-frame {
  position: absolute;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(17, 24, 39, .55);
  cursor: move;
  touch-action: none;
}
.crop-frame::before, .crop-frame::after,
.crop-frame .grid-h, .crop-frame .grid-v {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .35);
  pointer-events: none;
}
.crop-frame::before {
  left: 0; right: 0; top: 33.3333%; height: 1px;
}
.crop-frame::after {
  left: 0; right: 0; top: 66.6666%; height: 1px;
}
.crop-frame .grid-v { top: 0; bottom: 0; width: 1px; }
.crop-frame .grid-v.left { left: 33.3333%; }
.crop-frame .grid-v.right { left: 66.6666%; }

.handle {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 4px;
  touch-action: none;
}
.handle.tl { top: -8px; left: -8px; cursor: nwse-resize; }
.handle.tr { top: -8px; right: -8px; cursor: nesw-resize; }
.handle.bl { bottom: -8px; left: -8px; cursor: nesw-resize; }
.handle.br { bottom: -8px; right: -8px; cursor: nwse-resize; }

.dim-label {
  position: absolute;
  top: -28px; left: 0;
  background: var(--accent);
  color: var(--fg-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
}

.hint {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, .06);
  border: 1px solid rgba(59, 130, 246, .2);
  border-radius: 12px;
  font-size: 12px;
  color: var(--fg-secondary);
}

.side-col { display: flex; flex-direction: column; gap: 16px; }

.side-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: var(--surface);
}
.side-card h3 { font-size: 14px; font-weight: 700; margin: 0 0 12px; }
.side-card .small { font-size: 11px; color: var(--fg-muted); line-height: 1.5; margin: 8px 0 0; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: background .2s ease, border-color .2s ease;
  background: var(--surface-secondary);
}
.upload-zone:hover, .upload-zone.is-drag {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.upload-zone strong { font-size: 13px; font-weight: 600; color: var(--fg-secondary); }
.upload-zone span { font-size: 11px; color: var(--fg-muted); }
.upload-zone .filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-secondary);
  word-break: break-all;
}

#preview-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}
#preview-canvas.is-empty { display: flex; align-items: center; justify-content: center; }
.preview-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; }
.preview-meta .label { color: var(--fg-muted); }
.preview-meta .value { font-family: 'JetBrains Mono', monospace; font-weight: 600; }

.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: var(--fg-primary);
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  box-shadow: 0 12px 32px -12px rgba(250, 204, 21, .9);
  transition: transform .15s ease, box-shadow .25s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px) scale(1.01); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg-secondary);
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  transition: background .2s ease;
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-secondary); }
.btn-secondary:disabled { opacity: .4; cursor: not-allowed; }

.logo-footer-copy { border: 0; max-width: 1280px; padding: 0 64px; }

@media (max-width: 920px) {
  .logo-page { padding: 0 24px 56px; }
  .workspace { grid-template-columns: 1fr; }
  .stage { height: 380px; }
}
