/* PAGE HEADER */
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-light); border: 1px solid var(--accent-muted);
  padding: 4px 12px; border-radius: 100px; margin-bottom: 12px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 8px;
}
.page-header p { font-size: .9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 28px; }

/* DROPZONE - Specific overrides */
.dropzone-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 1px solid var(--accent-muted);
}

.dropzone-icon i {
  font-size: 28px;
  color: var(--accent);
}

.dropzone-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.dropzone-sub {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}

.upload-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.upload-btn i {
  font-size: 16px;
  color: var(--accent);
}

/* FILE CARD */
.file-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px;
  display: none; align-items: center; gap: 14px;
  margin-top: 18px; box-shadow: var(--shadow-sm);
}
.file-card.visible { display: flex; }
.fc-icon {
  width: 42px; height: 42px; background: var(--accent-light);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent-muted); flex-shrink: 0;
}
.fc-icon svg { width: 20px; height: 20px; stroke: var(--accent); }
.fc-meta { flex: 1; min-width: 0; }
.fc-name { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.fc-info { font-size: .75rem; color: var(--text-muted); }
.fc-remove {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition); flex-shrink: 0;
}
.fc-remove:hover { border-color: var(--error); color: var(--error); background: var(--error-light); }
.fc-remove svg { width: 13px; height: 13px; }

/* SECTION CARD */
.section-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 20px;
  margin-top: 14px; box-shadow: var(--shadow-sm); display: none;
}
.section-card.visible { display: block; }
.section-title {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: 16px;
}

/* POSITION GRID */
.position-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px; max-width: 220px; margin: 0 auto 8px;
}
.pos-btn {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); cursor: pointer;
  font-size: .68rem; color: var(--text-muted); font-weight: 600; letter-spacing: .02em;
}
.pos-btn:not(.center-cell):hover { border-color: var(--border-hover); background: var(--bg-card); }
.pos-btn.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.pos-btn.center-cell { background: var(--bg-primary); border-style: dashed; cursor: default; pointer-events: none; color: transparent; }
.pos-label { font-size: .8rem; color: var(--text-secondary); text-align: center; margin-bottom: 18px; font-weight: 500; }

/* OPTION ROWS */
.opt-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.opt-row:last-child { border-bottom: none; padding-bottom: 0; }
.opt-label { font-size: .87rem; font-weight: 500; margin-bottom: 2px; }
.opt-sub   { font-size: .75rem; color: var(--text-muted); }

/* pill group */
.pill-group { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 6px 14px; border-radius: 100px; border: 1.5px solid var(--border);
  font-size: .8rem; font-weight: 500; color: var(--text-secondary);
  background: var(--bg-secondary); transition: var(--transition); cursor: pointer;
}
.pill:hover { border-color: var(--border-hover); }
.pill.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* number input */
.num-input {
  width: 72px; padding: 7px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-secondary);
  color: var(--text-primary); font-size: .87rem; text-align: center;
  outline: none; transition: var(--transition);
}
.num-input:focus { border-color: var(--accent); }

/* format select */
.fmt-select {
  padding: 7px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--bg-secondary); color: var(--text-primary);
  font-size: .85rem; outline: none; transition: var(--transition); cursor: pointer;
}
.fmt-select:focus { border-color: var(--accent); }

/* color swatches */
.color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid transparent; cursor: pointer;
  transition: var(--transition); outline: 2px solid transparent; outline-offset: 2px;
}
.swatch.active { outline-color: var(--accent); }
.swatch-custom {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px dashed var(--border); display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; position: relative; transition: var(--transition);
}
.swatch-custom:hover { border-color: var(--accent); }
.swatch-custom input[type="color"] { position: absolute; inset: -4px; opacity: 0; cursor: pointer; width: 140%; height: 140%; }
.swatch-custom svg { width: 12px; height: 12px; stroke: var(--text-muted); pointer-events: none; }

/* LIVE PREVIEW */
.preview-wrap { margin-top: 16px; }
.preview-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.page-mock {
  width: 100%; max-width: 260px; aspect-ratio: 3/4;
  background: #fff; border-radius: 6px;
  box-shadow: var(--shadow-md); margin: 0 auto;
  position: relative; border: 1px solid var(--border); overflow: hidden;
}
[data-theme="dark"] .page-mock { background: #2a2724; }
.page-mock-lines { position: absolute; inset: 14px; display: flex; flex-direction: column; gap: 9px; }
.mock-line { height: 5px; background: var(--border); border-radius: 3px; }
.mock-line.s60 { width: 60%; }
.mock-line.s80 { width: 80%; }
.mock-line.s70 { width: 70%; }
.page-num-badge {
  position: absolute; font-size: 9px; font-weight: 700;
  color: #fff; padding: 2px 8px; border-radius: 4px;
  white-space: nowrap; transition: all .25s ease;
  font-family: var(--font-body);
}

@media (max-width: 600px) {
  main { padding: 24px 16px 120px; }
  .position-grid { max-width: 190px; }
  .opt-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}