* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222;
}

.preview-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: left;
}

.upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: #222;
  color: #fff;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 18px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.upload-label:hover {
  background: #333;
  transform: translateY(-1px);
}

.upload-label input {
  display: none;
}

.slate-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
}

/* Base slate image */
.slate-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

/* Printable area */
.printable-area {
  position: absolute;
  left: 32.2%;
  top: 16.1%;
  width: 34.8%;
  height: 64.9%;
  overflow: hidden;
  pointer-events: all;
  z-index: 2;
}

/* Uploaded image */
.overlay-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.05s ease-out;
}

/* Overlay mask */
.slate-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 3;
}

.hidden {
  display: none;
}

.controls {
  margin: 16px auto 0;
  max-width: 700px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #333;
}

.controls label {
  min-width: 55px;
}

.controls input[type="range"] {
  flex: 1;
  accent-color: #222;
  cursor: pointer;
}

.note {
  font-size: 0.8rem;
  color: #666;
  margin-top: 10px;
  text-align: left;
}
