:root {
  font-family: Arial, sans-serif;
  color: #1a1a1a;
}
body { margin: 0; padding: 24px; background: #f4f4f2; }
.wrap { max-width: 860px; margin: 0 auto; }
h1 { font-size: 22px; margin-bottom: 16px; }

.panel { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.panel label { display: block; font-size: 13px; font-weight: bold; margin: 12px 0 4px; }
.panel label:first-child { margin-top: 0; }
.row { display: flex; gap: 8px; }

input[type="text"], input[type="number"], select {
  flex: 1; padding: 8px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px;
}

button {
  padding: 8px 14px; border: none; border-radius: 6px; background: #1db954; color: #fff;
  font-weight: bold; cursor: pointer;
}
button:disabled { background: #bbb; cursor: not-allowed; }

.status { font-size: 13px; color: #555; min-height: 18px; }
.status.error { color: #c0392b; }
.hint { font-size: 12px; color: #888; margin: 6px 0 0; }

.preview-wrap { display: flex; justify-content: center; }
.preview-card {
  position: relative; width: 100%; max-width: 820px; aspect-ratio: 1.4 / 1;
  background: #fff; border: 1px solid #ddd; border-radius: 8px;
  display: flex; flex-direction: column; overflow: hidden;
}
.preview-header {
  height: 18%; display: flex; align-items: center; justify-content: center;
  border-bottom: 2px solid #000;
}
.preview-header img { max-height: 100%; max-width: 100%; object-fit: contain; }

.preview-grid {
  flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr);
}
.preview-grid .cell {
  border: 1px solid #000; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 6px; font-weight: bold; font-size: 14px; line-height: 1.15;
}

/* Tiled diagonal watermark — swap the <text> content or add your own logo shape here */
.watermark-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='140'><text x='10' y='80' font-size='30' font-family='Arial' fill='rgba(0,0,0,0.13)' transform='rotate(-25 120 70)'>PREVIEW</text></svg>");
  background-repeat: repeat;
}
