
.sticky-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.97) 35%);
}
.editor-actions {
  grid-column: 1 / -1;
  margin-top: -4px;
}

.button-link.ghost {
  border-color: var(--line);
  background: #fff;
}

.code-panel {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.code-panel code {
  display: block;
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fa;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 28px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.page-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.page-link:hover {
  border-color: var(--red-2);
  color: var(--red);
}

.page-link.is-disabled {
  opacity: 0.46;
  pointer-events: none;
}

.notice-success {
  border-color: rgba(50, 214, 126, 0.55);
  background: rgba(50, 214, 126, 0.11);
}

.compact {
  margin-top: 0;
}

.plate-editor-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.plate-editor-hero > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.plate-editor-hero span,
.plate-section-heading span,
.plate-preview-toolbar span {
  color: var(--red-2);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plate-editor-hero strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plate-editor-hero small,
.plate-section-heading small {
  color: var(--muted);
  font-weight: 700;
}

.plate-studio {
  display: grid;
  grid-template-columns: minmax(310px, 0.76fr) minmax(440px, 1.24fr);
  gap: 14px;
  align-items: start;
}

.plate-controls,
.plate-preview-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.plate-controls {
  display: grid;
}

.plate-control-section {
  display: grid;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.plate-control-section:last-child {
  border-bottom: 0;
}

.plate-section-heading,
.plate-preview-toolbar,
.plate-person-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plate-section-heading > div,
.plate-preview-toolbar > div {
  display: grid;
  gap: 2px;
}

.plate-section-heading strong,
.plate-preview-toolbar strong {
  font-size: 0.94rem;
}

.plate-section-heading output {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.plate-format-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.plate-format-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
}

.plate-format-switch button.is-active {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--red);
}

.plate-field,
.plate-range-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.plate-field > small,
.plate-person-photo-help {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.4;
}

.plate-field input,
.plate-field textarea,
.plate-field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 9px 11px;
}

.plate-field input,
.plate-field select {
  min-height: 40px;
}

.plate-field textarea {
  min-height: 64px;
  line-height: 1.35;
  resize: vertical;
}

.plate-field input:focus,
.plate-field textarea:focus,
.plate-field select:focus {
  border-color: var(--red-2);
  outline: 3px solid var(--focus-ring);
}

.plate-brand-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
}

.plate-brand-option input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--red);
}

.plate-brand-option span {
  display: grid;
  gap: 3px;
}

.plate-brand-option strong {
  color: var(--text);
  font-size: 0.8rem;
}

.plate-brand-option small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.4;
}

.plate-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
}

.plate-upload:hover {
  border-color: rgba(215, 31, 42, 0.45);
  background: var(--soft-red);
  color: var(--red);
}

.plate-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.plate-background-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(215, 31, 42, 0.35);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.plate-background-download:hover {
  border-color: var(--red);
  background: var(--soft-red);
}

.plate-control-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.plate-social-copy-field textarea {
  min-height: 156px;
}

.plate-copy-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plate-copy-toolbar > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.plate-copy-button {
  min-height: 38px;
  white-space: nowrap;
}

.plate-copy-feedback {
  min-height: 1.1em;
  color: #167443;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.4;
}

.plate-copy-feedback.is-error {
  color: var(--red);
}

.plate-source-url {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plate-background-reset {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.plate-background-reset:hover {
  color: var(--red-2);
}

.plate-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.plate-range-grid input {
  width: 100%;
  accent-color: var(--red);
}

.plate-people-list {
  display: grid;
  gap: 10px;
}

.plate-person {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.plate-person-heading {
  grid-column: 1 / -1;
}

.plate-author-picker {
  grid-column: 1 / -1;
}

.plate-person-preview {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  outline: 1px solid var(--line-strong);
  background: #30343a;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

.plate-person-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plate-person-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.plate-person-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.plate-upload--person {
  grid-column: 1 / -1;
  min-height: 36px;
}

.plate-person-photo-help {
  grid-column: 1 / -1;
  margin-top: -4px;
}

.plate-save-section {
  display: grid;
  gap: 12px;
  padding: 15px 16px;
  background: #f7f8fa;
}

.plate-save-section > div:first-child {
  display: grid;
  gap: 3px;
}

.plate-save-section strong {
  font-size: 0.9rem;
}

.plate-save-section small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.4;
}

.plate-save-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.plate-save-actions button {
  min-height: 38px;
}

.plate-save-actions .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.plate-reset-config {
  color: var(--muted-strong);
}

.plate-preview-panel {
  position: sticky;
  top: 20px;
}

.plate-preview-toolbar {
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.plate-render-status {
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0 !important;
  text-align: right;
  text-transform: none !important;
}

.plate-render-status.is-error {
  color: var(--red) !important;
}

.plate-canvas-stage {
  display: grid;
  min-height: 620px;
  max-height: calc(100vh - 215px);
  overflow: auto;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(45deg, #e8ebef 25%, transparent 25%),
    linear-gradient(-45deg, #e8ebef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8ebef 75%),
    linear-gradient(-45deg, transparent 75%, #e8ebef 75%),
    #f4f5f7;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.plate-canvas-stage canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 255px);
  background: #050505;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}

.plate-download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.plate-download-actions button {
  min-height: 38px;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.plate-download-actions .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
}

.plate-step-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

.plate-step-nav button {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
}

.plate-step-nav button > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.plate-step-nav button[aria-current="step"] {
  background: var(--panel-2);
  color: var(--red);
}

.plate-step-nav button[aria-current="step"] > span {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.plate-step-progress {
  margin: 0;
  padding: 12px 16px 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.plate-step-intro {
  padding: 10px 16px 15px;
  border-bottom: 1px solid var(--line);
}

.plate-step-intro h2 {
  margin: 0 0 5px;
  font-size: 1.15rem;
}

.plate-step-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.plate-step-actions {
  display: none;
}

.plate-wizard-ready .plate-step-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.plate-step-actions .primary-action {
  min-height: 38px;
  margin-left: auto;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.plate-sponsor-options {
  display: grid;
  gap: 12px;
}

.plate-review-summary {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 750;
}

.plate-preview-formats {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.plate-studio [hidden] {
  display: none !important;
}

.plate-wizard-ready .plate-canvas-stage {
  min-height: 0;
  height: clamp(240px, calc(100dvh - 508px), 650px);
  max-height: none;
}

.plate-wizard-ready .plate-canvas-stage canvas {
  max-height: clamp(204px, calc(100dvh - 544px), 614px);
}

.plate-preview-zoom-button {
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--red);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.plate-zoom-dialog {
  width: min(90vw, 850px);
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.plate-zoom-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.plate-zoom-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.plate-zoom-dialog img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 105px);
  width: auto;
  height: auto;
  margin: auto;
}
