/* Inkloom production tools */

.tool-card {
  position: relative;
}

.tool-card-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.tool-live-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(7, 26, 47, .78);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}

.tool-live-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66d5a5;
  box-shadow: 0 0 0 3px rgba(102, 213, 165, .2);
  content: "";
}

.tool-card-copy {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 21px 21px;
}

.tool-card .tool-card-copy strong {
  padding: 0;
}

.tool-card-copy small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.tool-card-copy > svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: var(--forest);
  transition: transform .18s ease;
}

.tool-card:hover .tool-card-copy > svg {
  transform: translateX(3px);
}

.modal-backdrop:has(.tool-studio-modal) {
  padding: 20px;
  background: rgba(3, 13, 27, .76);
  backdrop-filter: blur(8px);
}

.simple-modal.tool-studio-modal {
  width: min(100%, 1380px);
  overflow: hidden;
  border: 1px solid rgba(201, 166, 85, .68);
  border-radius: 7px;
  padding: 0;
  background: #f5f1e9;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .34);
}

.tool-studio-modal .modal-close {
  right: 19px;
  top: 19px;
  width: 40px;
  height: 40px;
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
}

.tool-studio-modal .modal-close svg {
  fill: currentColor;
}

.tool-studio {
  --studio-navy: #061a30;
  --studio-navy-soft: #102943;
  --studio-gold: #cba85c;
  --studio-paper: #f8f5ee;
  --studio-line: #d8d1c4;
  color: #14283d;
  background: var(--studio-paper);
}

.studio-header {
  min-height: 162px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 35px 82px 34px 42px;
  color: #fff;
  background:
    radial-gradient(circle at 78% -60%, rgba(201, 166, 85, .32), transparent 42%),
    linear-gradient(118deg, #041426, var(--studio-navy-soft));
}

.studio-header > div:first-child {
  max-width: 760px;
}

.studio-header .studio-eyebrow {
  margin: 0 0 8px;
  color: #e7ce91;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.studio-header h2,
.simple-modal.tool-studio-modal .studio-header h2 {
  margin: 0;
  color: #fffaf0;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1;
}

.studio-header p:last-child {
  max-width: 710px;
  margin: 11px 0 0;
  color: #c7d2de;
  font-size: 14px;
  line-height: 1.5;
}

.studio-engine-state {
  min-width: 195px;
  display: grid;
  grid-template-columns: 11px 1fr;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 4px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .07);
}

.studio-engine-state > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e6c46e;
  box-shadow: 0 0 0 4px rgba(230, 196, 110, .13);
}

.studio-engine-state.is-online > span {
  background: #5bd39a;
  box-shadow: 0 0 0 4px rgba(91, 211, 154, .14);
}

.studio-engine-state.is-offline > span {
  background: #ef746b;
  box-shadow: 0 0 0 4px rgba(239, 116, 107, .14);
}

.studio-engine-state strong,
.studio-engine-state small {
  display: block;
}

.studio-engine-state strong {
  color: #fff;
  font-size: 12px;
}

.studio-engine-state small {
  margin-top: 2px;
  color: #aebcca;
  font-size: 10px;
}

.studio-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #cfc7b9;
  background: #fffdf8;
}

.studio-tab {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-right: 1px solid #ded7ca;
  border-bottom: 3px solid transparent;
  padding: 12px 18px 9px;
  color: #65717e;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.studio-tab:last-child {
  border-right: 0;
}

.studio-tab svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.studio-tab:hover {
  color: var(--forest);
  background: #f9f5ec;
}

.studio-tab[aria-pressed="true"] {
  border-bottom-color: var(--studio-gold);
  color: var(--forest);
  background: #f8f3e9;
}

.studio-layout {
  min-height: 690px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
}

.studio-controls {
  padding: 30px;
  border-right: 1px solid var(--studio-line);
  background: #fffdf8;
}

.studio-upload {
  min-height: 152px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-content: center;
  gap: 5px 13px;
  border: 1px dashed #a9a091;
  border-radius: 4px;
  padding: 20px;
  background: #faf7f0;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.studio-upload:hover,
.studio-upload.is-dragging {
  border-color: var(--forest);
  background: #f3f2e9;
  box-shadow: inset 0 0 0 1px rgba(20, 60, 54, .08);
}

.studio-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.studio-upload-icon {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
}

.studio-upload-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.studio-upload strong,
.studio-upload small {
  display: block;
}

.studio-upload strong {
  margin-top: 2px;
  color: var(--ink);
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 17px;
}

.studio-upload small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.studio-browse {
  grid-column: 1 / -1;
  width: fit-content;
  margin: 10px 0 0 55px;
  border-bottom: 1px solid var(--forest);
  color: var(--forest);
  font-size: 11px;
  font-weight: 900;
}

.studio-file-summary {
  display: grid;
  grid-template-columns: 28px 1fr 25px;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  border: 1px solid #d8d1c5;
  border-radius: 3px;
  padding: 11px 12px;
  background: #f8f5ee;
}

.studio-file-summary > svg {
  width: 25px;
  height: 25px;
  fill: var(--forest);
}

.studio-file-summary strong,
.studio-file-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-file-summary strong {
  font-size: 11px;
}

.studio-file-summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.studio-file-check {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2c8a66;
}

.studio-file-check svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.studio-control-group {
  margin: 25px 0 0;
  border: 0;
  border-top: 1px solid #e1dacd;
  padding: 22px 0 0;
}

.studio-control-group legend {
  float: left;
  width: 100%;
  margin: 0 0 13px;
  padding: 0;
  color: #22384b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.studio-control-group legend + * {
  clear: both;
}

.studio-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.studio-field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.studio-field-grid label,
.studio-palette-grid label {
  display: grid;
  gap: 6px;
}

.studio-field-grid label.wide {
  grid-column: 1 / -1;
}

.studio-field-grid label > span,
.studio-palette-grid label > span {
  color: #4d5b69;
  font-size: 10px;
  font-weight: 800;
}

.studio-field-grid label small {
  color: #89919a;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.studio-field-grid input {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  border: 1px solid #cfc7b9;
  border-radius: 3px;
  padding: 8px 9px;
  color: #152b3f;
  background: #fff;
  font-size: 11px;
}

.studio-field-grid input:focus,
.studio-upload:focus-within {
  border-color: var(--forest);
  outline: 2px solid rgba(20, 60, 54, .12);
  outline-offset: 1px;
}

.studio-range-label {
  display: grid;
  gap: 11px;
}

.studio-range-label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #344a5e;
  font-size: 11px;
  font-weight: 800;
}

.studio-range-label output {
  min-width: 29px;
  border-radius: 999px;
  padding: 4px 7px;
  color: #fff;
  background: var(--forest);
  font-size: 9px;
  text-align: center;
}

.studio-range-label input {
  width: 100%;
  accent-color: var(--forest);
}

.studio-control-note {
  margin: 10px 0 0 !important;
  color: #77818b !important;
  font-size: 9px !important;
  line-height: 1.55;
}

.studio-segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  border: 1px solid #cfc7b9;
  border-radius: 3px;
}

.studio-segmented input {
  position: absolute;
  opacity: 0;
}

.studio-segmented span {
  min-height: 40px;
  display: grid;
  place-items: center;
  color: #566474;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.studio-segmented label + label span {
  border-left: 1px solid #cfc7b9;
}

.studio-segmented input:checked + span {
  color: #fff;
  background: var(--forest);
}

.studio-scale-options span {
  min-height: 52px;
  align-content: center;
  gap: 2px;
}

.studio-scale-options strong,
.studio-scale-options small {
  display: block;
}

.studio-scale-options strong {
  font-size: 11px;
}

.studio-scale-options small {
  color: #84908f;
  font-size: 7.5px;
  font-weight: 700;
}

.studio-scale-options input:checked + span small {
  color: #c8d8d4;
}

.studio-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.studio-quality-grid input,
.studio-engine-options input {
  position: absolute;
  opacity: 0;
}

.studio-quality-grid span {
  min-height: 65px;
  display: grid;
  align-content: center;
  border: 1px solid #cfc7b9;
  border-radius: 3px;
  padding: 7px;
  color: #5f6d72;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.studio-quality-grid strong,
.studio-quality-grid small,
.studio-engine-options strong,
.studio-engine-options small {
  display: block;
}

.studio-quality-grid strong {
  font-size: 8px;
}

.studio-quality-grid small {
  margin-top: 3px;
  color: #8a9294;
  font-size: 6.5px;
  line-height: 1.25;
}

.studio-quality-grid input:checked + span {
  border-color: var(--forest);
  color: var(--forest);
  background: #eef4f0;
  box-shadow: inset 0 0 0 1px var(--forest);
}

.detail-strength {
  margin-top: 16px;
}

.studio-engine-options {
  display: grid;
  gap: 7px;
}

.studio-engine-options span {
  min-height: 52px;
  display: block;
  position: relative;
  border: 1px solid #cfc7b9;
  border-radius: 3px;
  padding: 9px 10px 8px 34px;
  color: #57666a;
  background: #fff;
  cursor: pointer;
}

.studio-engine-options span::before {
  position: absolute;
  left: 11px;
  top: 13px;
  width: 12px;
  height: 12px;
  border: 1px solid #9aa39f;
  border-radius: 50%;
  content: "";
}

.studio-engine-options strong {
  font-size: 9px;
}

.studio-engine-options small {
  margin-top: 3px;
  color: #818a8d;
  font-size: 7.5px;
}

.studio-engine-options input:checked + span {
  border-color: var(--forest);
  color: var(--forest);
  background: #eef4f0;
}

.studio-engine-options input:checked + span::before {
  border: 3px solid #fff;
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--forest);
}

.studio-check-line {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 9px;
  margin-top: 13px;
  cursor: pointer;
}

.studio-check-line input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--forest);
}

.studio-check-line input:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.studio-check-line:has(input:disabled) {
  cursor: not-allowed;
  opacity: .68;
}

.studio-check-line strong,
.studio-check-line small {
  display: block;
}

.studio-check-line strong {
  font-size: 10px;
}

.studio-check-line small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.studio-colour-field {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
}

.studio-colour-field input {
  width: 56px;
  height: 50px;
  border: 0;
  border-radius: 3px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.studio-colour-field strong,
.studio-colour-field small {
  display: block;
}

.studio-colour-field strong {
  font-family: Consolas, monospace;
  font-size: 12px;
}

.studio-colour-field small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.studio-run {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}

.studio-run svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.studio-run:disabled {
  cursor: not-allowed;
  filter: saturate(.2);
  opacity: .52;
}

.studio-privacy {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 3px 0 !important;
  color: #7a848d !important;
  font-size: 8.5px !important;
  line-height: 1.4;
}

.studio-privacy svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: #398264;
}

.studio-inline-alert {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  margin-top: 16px;
  border: 1px solid #dfb4aa;
  border-radius: 3px;
  padding: 11px;
  color: #6d302b;
  background: #fff1ec;
  font-size: 10px;
  line-height: 1.45;
}

.studio-inline-alert svg {
  width: 17px;
  height: 17px;
  fill: #a44339;
}

.studio-stage {
  min-width: 0;
  padding: 30px;
  background:
    linear-gradient(rgba(255, 255, 255, .72), rgba(255, 255, 255, .72)),
    radial-gradient(circle at 1px 1px, #c9c2b7 1px, transparent 1.2px);
  background-size: auto, 18px 18px;
}

.studio-empty-state {
  min-height: 630px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 1px dashed #bdb5a8;
  border-radius: 4px;
  padding: 50px;
  background: rgba(255, 253, 248, .88);
  text-align: center;
}

.studio-empty-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid #d3c6a9;
  border-radius: 50%;
  color: var(--forest);
  background: #f4ecda;
}

.studio-empty-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.studio-overline {
  margin: 0 0 8px !important;
  color: #92773d !important;
  font-size: 9px !important;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.studio-empty-state h3 {
  margin: 0;
  color: var(--ink);
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 29px;
}

.studio-empty-state > p:not(.studio-overline) {
  max-width: 490px;
  margin: 10px auto 18px !important;
  color: #687584 !important;
  font-size: 12px;
}

.studio-empty-state ul {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 3px 0 25px;
  padding: 0;
  list-style: none;
}

.studio-empty-state li {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #41576b;
  font-size: 9px;
  font-weight: 800;
}

.studio-empty-state li svg {
  width: 13px;
  height: 13px;
  fill: #32805e;
}

.studio-empty-state > small {
  max-width: 510px;
  border-top: 1px solid #ded7ca;
  padding-top: 18px;
  color: #8a9198;
  font-size: 9px;
}

.studio-preview-card,
.preflight-card,
.studio-result-bar,
.card-preview-panel,
.card-production-specs {
  border: 1px solid #d4cdc1;
  border-radius: 4px;
  background: #fffdf8;
  box-shadow: 0 10px 24px rgba(7, 26, 47, .06);
}

.studio-preview-head {
  min-height: 61px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 17px;
  border-bottom: 1px solid #ddd6ca;
}

.studio-preview-head span,
.studio-preview-head strong,
.studio-preview-head small {
  display: block;
}

.studio-preview-head span {
  color: #987c41;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.studio-preview-head strong {
  max-width: 520px;
  margin-top: 2px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-preview-head > small {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.studio-artboard {
  position: relative;
  height: 410px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 26px;
  background-color: #e7e4dd;
  background-image:
    linear-gradient(45deg, #d9d5cd 25%, transparent 25%),
    linear-gradient(-45deg, #d9d5cd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9d5cd 75%),
    linear-gradient(-45deg, transparent 75%, #d9d5cd 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.studio-artboard > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(7, 26, 47, .16));
}

.studio-comparison {
  --split: 50%;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.studio-comparison > img,
.comparison-after,
.comparison-after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.comparison-after {
  clip-path: inset(0 0 0 var(--split));
  background-color: #e7e4dd;
  background-image:
    linear-gradient(45deg, #d9d5cd 25%, transparent 25%),
    linear-gradient(-45deg, #d9d5cd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9d5cd 75%),
    linear-gradient(-45deg, transparent 75%, #d9d5cd 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.comparison-rule {
  position: absolute;
  z-index: 3;
  left: var(--split);
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(7, 26, 47, .35);
  pointer-events: none;
}

.comparison-rule::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .26);
  content: "↔";
  color: #fff;
  font-size: 15px;
  line-height: 30px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.studio-comparison input {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
}

.comparison-label {
  position: absolute;
  z-index: 3;
  top: 13px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(7, 26, 47, .72);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(7px);
}

.comparison-label.before {
  left: 13px;
}

.comparison-label.after {
  right: 13px;
}

.upscale-proof {
  overflow: hidden;
  margin-top: 15px;
  border: 1px solid #d6cec1;
  border-radius: 4px;
  color: #253b38;
  background: #fffdf9;
  box-shadow: 0 8px 24px rgba(22, 38, 41, .06);
}

.upscale-proof-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #ded7cc;
  padding: 16px 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(201, 166, 85, .12), transparent 35%),
    #f7f3ea;
}

.upscale-proof-head span,
.upscale-proof-head strong {
  display: block;
}

.upscale-proof-head span {
  color: #92743c;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.upscale-proof-head strong {
  margin-top: 3px;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 17px;
  font-weight: 500;
}

.upscale-proof-head small {
  max-width: 310px;
  color: #778183;
  font-size: 8px;
  line-height: 1.45;
  text-align: right;
}

.upscale-gain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5ded3;
  padding: 13px 18px;
}

.upscale-gain-grid > div:not(.upscale-gain-badge) {
  min-width: 0;
}

.upscale-gain-grid small,
.upscale-gain-grid strong,
.upscale-gain-grid span {
  display: block;
}

.upscale-gain-grid small {
  color: #8d7440;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.upscale-gain-grid strong {
  margin-top: 2px;
  font-size: 12px;
}

.upscale-gain-grid span {
  margin-top: 2px;
  color: #7b8587;
  font-size: 7.5px;
}

.upscale-gain-grid > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
}

.upscale-gain-grid > b svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.upscale-gain-badge {
  min-width: 70px;
  border-left: 1px solid #ddd6ca;
  padding-left: 15px;
  text-align: center;
}

.upscale-gain-badge strong {
  margin: 0;
  color: #956f2f;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 20px;
}

.pixel-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #d8d1c6;
}

.pixel-proof-grid figure {
  min-width: 0;
  margin: 0;
  background: #fff;
}

.pixel-proof-window {
  position: relative;
  height: 250px;
  overflow: hidden;
  background-color: #e7e4dc;
  background-image:
    linear-gradient(45deg, #d8d4cb 25%, transparent 25%),
    linear-gradient(-45deg, #d8d4cb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d8d4cb 75%),
    linear-gradient(-45deg, transparent 75%, #d8d4cb 75%);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
  cursor: crosshair;
}

.pixel-proof-window::after {
  position: absolute;
  z-index: 2;
  left: var(--focus-x);
  top: var(--focus-y);
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) center / 7px 1px no-repeat,
    linear-gradient(#fff, #fff) center / 1px 7px no-repeat,
    rgba(20, 49, 44, .58);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .24);
  content: "";
  opacity: .74;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.pixel-proof-window img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: scale(var(--detail-zoom));
  transform-origin: var(--focus-x) var(--focus-y);
  transition: transform .22s ease, transform-origin .22s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.pixel-proof-grid figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 39px;
  padding: 9px 12px;
}

.pixel-proof-grid figcaption strong {
  font-size: 8.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pixel-proof-grid figcaption span {
  overflow: hidden;
  color: #7d8789;
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-proof-grid figure:last-child figcaption strong {
  color: #277052;
}

.pixel-proof-controls {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) 1fr;
  align-items: center;
  gap: 25px;
  border-top: 1px solid #ddd6ca;
  padding: 13px 18px;
  background: #faf7f0;
}

.pixel-proof-controls label > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #4d5d5a;
  font-size: 8px;
  font-weight: 900;
}

.pixel-proof-controls output {
  color: #916f33;
}

.pixel-proof-controls input {
  width: 100%;
  accent-color: var(--forest);
}

.pixel-proof-controls p {
  margin: 0 !important;
  color: #747f80 !important;
  font-size: 8px !important;
  line-height: 1.45;
  text-align: right;
}

.pixel-proof-controls p::before {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: #2d8966;
  content: "";
  vertical-align: 1px;
}

.studio-processing {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background: rgba(5, 23, 42, .82);
  backdrop-filter: blur(6px);
}

.studio-processing strong {
  margin-top: 14px;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 20px;
}

.studio-processing small {
  max-width: 340px;
  margin-top: 5px;
  color: #c8d3de;
  font-size: 10px;
  text-align: center;
}

.studio-processing-track {
  position: relative;
  width: min(260px, 68%);
  height: 4px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}

.studio-processing-track i {
  position: absolute;
  inset: 0 auto 0 -42%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #d9b85d 28%, #fff0ba 70%, transparent);
  animation: studio-progress 1.35s ease-in-out infinite;
}

.studio-processing em {
  margin-top: 8px;
  color: #e8d59c;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.studio-spinner {
  width: 25px;
  height: 25px;
  display: inline-block;
  border: 2px solid rgba(201, 166, 85, .28);
  border-top-color: #c9a655;
  border-radius: 50%;
  animation: studio-spin .8s linear infinite;
}

@keyframes studio-spin {
  to { transform: rotate(360deg); }
}

@keyframes studio-progress {
  from { left: -42%; }
  to { left: 100%; }
}

.studio-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 15px;
  padding: 14px 16px;
}

.studio-result-bar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-result-bar strong,
.studio-result-bar small {
  display: block;
}

.studio-result-bar strong {
  font-size: 11px;
}

.studio-result-bar small {
  max-width: 390px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.result-ready-mark {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2d8966;
}

.result-ready-mark svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.studio-result-bar .button {
  min-height: 38px;
  padding: 9px 13px;
  font-size: 9px;
}

.studio-result-bar .button svg {
  width: 15px;
  height: 15px;
  display: inline-block;
  margin-right: 5px;
  fill: currentColor;
  vertical-align: -3px;
}

.preflight-card {
  margin-top: 15px;
  overflow: hidden;
}

.preflight-head {
  min-height: 75px;
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e0d9cc;
  background: #f7f4ed;
}

.preflight-card.is-loading .preflight-head {
  grid-template-columns: 35px 1fr;
  border-bottom: 0;
}

.preflight-status-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #a57b2e;
}

.status-ready .preflight-status-icon {
  background: #2d8966;
}

.status-blocked .preflight-status-icon {
  background: #a44339;
}

.preflight-status-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.preflight-head span:not(.preflight-status-icon):not(.preflight-grade) {
  display: block;
  color: #9a7d40;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.preflight-head strong,
.preflight-head small {
  display: block;
}

.preflight-head strong {
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 17px;
}

.preflight-head small {
  margin-top: 2px;
  color: #6e7882;
  font-size: 9px;
}

.preflight-grade {
  border: 1px solid #c9a655;
  border-radius: 999px;
  padding: 5px 8px;
  color: #7c622e;
  background: #fbf2d8;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
}

.status-ready .preflight-grade {
  border-color: #9bc7b3;
  color: #23694e;
  background: #e8f5ee;
}

.status-blocked .preflight-grade {
  border-color: #ddb0aa;
  color: #8b352e;
  background: #fff0ec;
}

.preflight-checks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.preflight-check {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 7px;
  padding: 13px 11px;
  border-right: 1px solid #e6dfd3;
}

.preflight-check:last-child {
  border-right: 0;
}

.preflight-check > span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2d8966;
}

.preflight-check.level-warning > span {
  background: #ae8331;
}

.preflight-check.level-fail > span {
  background: #a44339;
}

.preflight-check > span svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.preflight-check strong,
.preflight-check small,
.preflight-check b {
  display: block;
}

.preflight-check strong {
  overflow: hidden;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preflight-check small {
  display: none;
}

.preflight-check b {
  grid-column: 2;
  color: #687583;
  font-size: 8px;
}

.preflight-disclaimer {
  margin: 0 !important;
  border-top: 1px solid #e6dfd3;
  padding: 9px 14px;
  color: #8a9096 !important;
  background: #fbf9f4;
  font-size: 8px !important;
}

.selected-card-template {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid #cfc7b9;
  border-radius: 4px;
  padding: 10px;
  background: #fff;
}

.selected-card-template > span:not(.card-template-mini) {
  min-width: 0;
}

.selected-card-template small,
.selected-card-template strong,
.selected-card-template em {
  display: block;
}

.selected-card-template small {
  color: #8d7440;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.selected-card-template strong {
  overflow: hidden;
  margin-top: 3px;
  color: #172d2a;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 13px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-card-template em {
  overflow: hidden;
  margin-top: 4px;
  color: #798087;
  font-size: 7.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-card-template > button {
  min-height: 30px;
  grid-column: 1 / -1;
  border: 1px solid #1c413a;
  border-radius: 3px;
  color: #fff;
  background: #1c413a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
}

.selected-card-template > button:hover {
  background: #28574d;
}

.card-template-mini {
  --mini-ground: #0a2849;
  --mini-accent: #d9ad5b;
  --mini-type: #fffaf0;
  position: relative;
  width: 100%;
  aspect-ratio: 1.75;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(20, 28, 35, .14);
  color: var(--mini-type);
  background: var(--mini-ground);
}

.card-template-mini > * {
  position: absolute;
  display: block;
}

.card-template-mini .mini-accent {
  inset: 0 auto 0 0;
  width: 5%;
  background: var(--mini-accent);
}

.card-template-mini > b {
  display: none;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: clamp(10px, 1.9vw, 22px);
  line-height: 1;
}

.card-template-mini .mini-name,
.card-template-mini .mini-role,
.card-template-mini .mini-contact {
  left: 11%;
  height: 4%;
  border-radius: 10px;
  background: currentColor;
}

.card-template-mini .mini-name {
  top: 28%;
  width: 39%;
}

.card-template-mini .mini-role {
  top: 40%;
  width: 24%;
  height: 2.2%;
  color: var(--mini-accent);
}

.card-template-mini .mini-contact {
  bottom: 18%;
  width: 31%;
  height: 2%;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
  opacity: .76;
}

.card-template-mini.layout-centered .mini-accent {
  inset: 62% 38% auto;
  width: auto;
  height: 2px;
}

.card-template-mini.layout-centered .mini-name,
.card-template-mini.layout-centered .mini-role,
.card-template-mini.layout-centered .mini-contact {
  left: 50%;
  transform: translateX(-50%);
}

.card-template-mini.layout-centered .mini-name {
  top: 34%;
}

.card-template-mini.layout-centered .mini-role {
  top: 48%;
}

.card-template-mini.layout-centered .mini-contact {
  bottom: 13%;
  width: 42%;
  box-shadow: none;
}

.card-template-mini.layout-editorial .mini-accent {
  inset: 0 0 0 68%;
  width: auto;
}

.card-template-mini.layout-editorial > b {
  right: 9%;
  top: 39%;
  display: block;
  color: var(--mini-ground);
}

.card-template-mini.layout-split .mini-accent {
  inset: 0 60% 0 0;
  width: auto;
}

.card-template-mini.layout-split > b {
  left: 14%;
  top: 37%;
  display: block;
  color: var(--mini-ground);
}

.card-template-mini.layout-split .mini-name,
.card-template-mini.layout-split .mini-role,
.card-template-mini.layout-split .mini-contact {
  left: 48%;
}

.card-template-mini.layout-frame .mini-accent {
  inset: 8%;
  width: auto;
  border: 1px solid var(--mini-accent);
  background: transparent;
}

.card-template-mini.layout-frame .mini-name,
.card-template-mini.layout-frame .mini-role,
.card-template-mini.layout-frame .mini-contact {
  left: 50%;
  transform: translateX(-50%);
}

.card-template-mini.layout-frame .mini-name {
  top: 31%;
}

.card-template-mini.layout-frame .mini-role {
  top: 44%;
}

.card-template-mini.layout-frame .mini-contact {
  bottom: 19%;
  box-shadow: none;
}

.card-template-mini.layout-corner::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18%;
  height: 28%;
  background: var(--mini-accent);
  content: "";
}

.card-template-mini.layout-corner .mini-accent {
  width: 18%;
  height: 28%;
}

.card-template-mini.layout-band .mini-accent {
  inset: auto 0 0;
  width: auto;
  height: 34%;
}

.card-template-mini.layout-band .mini-contact {
  z-index: 1;
  bottom: 18%;
  color: var(--mini-ground);
  box-shadow: 0 4px 0 currentColor;
  opacity: 1;
}

.card-template-mini.layout-monogram > b {
  right: 5%;
  top: 18%;
  display: block;
  color: var(--mini-accent);
  font-size: clamp(21px, 4.4vw, 48px);
  opacity: .44;
}

.card-template-mini.layout-monogram .mini-accent {
  inset: 15% auto 15% 7%;
  width: 2px;
}

.card-template-mini.layout-diagonal .mini-accent {
  inset: -20% -8% -20% 58%;
  width: auto;
  transform: skewX(-17deg);
}

.card-template-mini.layout-diagonal > b {
  right: 8%;
  top: 38%;
  display: block;
  color: var(--mini-ground);
}

.card-template-mini.layout-grid .mini-accent {
  inset: 12% 8% auto;
  width: auto;
  height: 2px;
}

.card-template-mini.layout-grid::after {
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 44%;
  width: 1px;
  background: color-mix(in srgb, var(--mini-accent) 70%, transparent);
  content: "";
}

.card-template-mini.layout-grid .mini-contact {
  left: 53%;
  bottom: 34%;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.template-library-backdrop {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 21, 25, .72);
  backdrop-filter: blur(8px);
}

.template-library-panel {
  width: min(1240px, 100%);
  height: min(850px, calc(100vh - 48px));
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #bfb6a7;
  border-radius: 6px;
  color: #172d2a;
  background: #f7f3eb;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34);
}

.template-library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid #d7d0c4;
  padding: 27px 30px 23px;
  background:
    radial-gradient(circle at 92% 0, rgba(208, 173, 91, .13), transparent 24%),
    #f1ecdf;
}

.template-library-header p {
  margin: 0 0 5px;
  color: #927742;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.template-library-header h3 {
  margin: 0;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 500;
  line-height: 1;
}

.template-library-header span {
  display: block;
  margin-top: 8px;
  color: #68747a;
  font-size: 11px;
}

.template-library-header .icon-only {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #c8c0b3;
  border-radius: 50%;
  color: #263d39;
  background: #fff;
  cursor: pointer;
}

.template-library-header .icon-only:hover {
  border-color: #294e47;
  background: #edf2ed;
}

.template-library-header .icon-only svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.template-library-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #ddd6cb;
  padding: 14px 30px;
  background: #fff;
}

.template-search {
  position: relative;
  min-width: 270px;
  flex: 1;
}

.template-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  fill: #6b777d;
  transform: translateY(-50%);
}

.template-search input {
  width: 100%;
  height: 40px;
  border: 1px solid #cfc8bd;
  border-radius: 3px;
  padding: 0 13px 0 38px;
  color: #1e3330;
  background: #fbfaf7;
  font: inherit;
  font-size: 11px;
  outline: none;
}

.template-search input:focus {
  border-color: #315e55;
  box-shadow: 0 0 0 3px rgba(49, 94, 85, .11);
}

.template-category-tabs {
  display: flex;
  gap: 5px;
}

.template-category-tabs button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 13px;
  color: #667278;
  background: transparent;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.template-category-tabs button:hover {
  color: #1f403a;
  background: #f1f3ef;
}

.template-category-tabs button[aria-pressed="true"] {
  border-color: #315e55;
  color: #fff;
  background: #315e55;
}

.template-library-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 30px 4px;
  color: #778186;
  font-size: 8.5px;
}

.template-library-meta strong {
  color: #2b413d;
  font-size: 9px;
}

.template-library-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 10px 30px 30px;
  scrollbar-color: #a9a294 transparent;
  scrollbar-width: thin;
}

.template-library-card {
  min-width: 0;
  display: block;
  border: 1px solid #d0c9bd;
  border-radius: 4px;
  padding: 8px;
  color: inherit;
  background: #fff;
  box-shadow: 0 3px 12px rgba(25, 40, 44, .04);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.template-library-card:hover {
  border-color: #567a72;
  box-shadow: 0 10px 24px rgba(25, 40, 44, .12);
  transform: translateY(-2px);
}

.template-library-card[aria-pressed="true"] {
  border-color: #254f46;
  box-shadow: 0 0 0 2px #254f46;
}

.template-library-card .card-template-mini {
  box-shadow: 0 6px 16px rgba(16, 25, 30, .16);
}

.template-card-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 3px 2px;
}

.template-card-copy > span,
.template-card-copy small,
.template-card-copy strong {
  min-width: 0;
  display: block;
}

.template-card-copy small {
  color: #977d48;
  font-size: 6.5px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.template-card-copy strong {
  overflow: hidden;
  margin-top: 3px;
  color: #233b37;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card-copy > i {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #315e55;
}

.template-card-copy > i:empty {
  visibility: hidden;
}

.template-card-copy > i svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.template-library-empty {
  min-height: 260px;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed #c8c0b4;
  color: #71807d;
  background: #fff;
  text-align: center;
}

.template-library-empty svg {
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  fill: #a5874c;
}

.template-library-empty strong {
  color: #2c4741;
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: 17px;
}

.template-library-empty small {
  font-size: 9px;
}

.studio-palette-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.studio-palette-grid input {
  width: 100%;
  height: 36px;
  border: 1px solid #cfc7b9;
  border-radius: 3px;
  padding: 3px;
  background: #fff;
  cursor: pointer;
}

.card-side-editor p {
  margin: 9px 1px 0 !important;
  color: #7a838a !important;
  font-size: 8px !important;
  line-height: 1.45;
}

.card-side-selector {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
}

.card-side-selector button,
.card-side-switch button {
  min-height: 34px;
  border: 1px solid #c9c2b6;
  border-radius: 3px;
  color: #536069;
  background: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.card-side-selector button[aria-pressed="true"],
.card-side-switch button[aria-pressed="true"] {
  border-color: #1c413a;
  color: #fff;
  background: #1c413a;
  box-shadow: 0 0 0 1px #1c413a;
}

.card-side-selector .card-flip-control {
  min-width: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: #caa65d;
  color: #6d5527;
  background: #fffaf0;
}

.card-side-selector svg,
.card-side-switch svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.card-preview-side-tools {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.card-preview-side-tools > small {
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.card-side-switch {
  display: grid;
  grid-template-columns: auto 30px auto;
  gap: 4px;
}

.card-side-switch button {
  min-width: 54px;
  min-height: 25px;
  padding: 3px 8px;
}

.card-side-switch button:nth-child(2) {
  min-width: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-color: #caa65d;
  color: #6d5527;
  background: #fffaf0;
}

.card-proof-surface {
  min-height: 500px;
  display: grid;
  place-items: center;
  padding: 60px 42px;
  background: #e9e5dd;
}

.card-bleed-guide {
  position: relative;
  width: min(720px, 90%);
  aspect-ratio: 1.75;
  border: 1px dashed #a9463c;
  padding: 2.8%;
  perspective: 1400px;
}

.card-bleed-guide::before,
.card-bleed-guide::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.card-bleed-guide::before {
  inset: 2.8%;
  border: 1px solid rgba(255, 255, 255, .72);
}

.card-bleed-guide::after {
  inset: 8%;
  border: 1px dashed rgba(235, 211, 151, .88);
}

.card-proof-notes {
  position: absolute;
  left: 18px;
  bottom: 15px;
  display: flex;
  gap: 14px;
  color: #717980;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .1em;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .62s cubic-bezier(.2, .72, .22, 1);
}

.card-bleed-guide.is-back .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-inner > .business-card-preview {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

.card-face-front {
  transform: rotateY(0deg);
}

.card-back-preview {
  transform: rotateY(180deg);
}

.business-card-preview {
  --card-ground: #0a2849;
  --card-accent: #d9ad5b;
  --card-type: #fffaf0;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--card-type);
  background: var(--card-ground);
  box-shadow: 0 24px 45px rgba(7, 26, 47, .24);
}

.card-back-accent,
.card-back-preview::after {
  position: absolute;
  background: var(--card-accent);
  content: "";
}

.card-back-mark,
.card-back-copy {
  position: absolute;
  z-index: 2;
  left: 50%;
  width: 76%;
  text-align: center;
  transform: translateX(-50%);
}

.card-back-mark {
  top: 20%;
}

.card-back-mark b {
  color: var(--card-accent);
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: clamp(42px, 8vw, 88px);
  line-height: .9;
}

.card-back-copy {
  top: 55%;
}

.card-back-copy strong,
.card-back-copy span,
.card-back-copy em {
  display: block;
}

.card-back-copy strong {
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: clamp(13px, 2vw, 22px);
  line-height: 1;
}

.card-back-copy span {
  margin-top: 7px;
  font-size: clamp(6px, .85vw, 9px);
  letter-spacing: .08em;
}

.card-back-copy em {
  margin-top: 13px;
  color: var(--card-accent);
  font-size: clamp(6px, .8vw, 9px);
  font-style: normal;
  font-weight: 900;
  letter-spacing: .1em;
}

.back-minimal .card-back-accent {
  inset: 0 0 0 auto;
  width: 4%;
}

.back-centered .card-back-accent {
  left: 32%;
  right: 32%;
  top: 9%;
  height: 2px;
  box-shadow: 0 calc(clamp(90px, 25vw, 180px)) 0 var(--card-accent);
}

.back-editorial .card-back-accent {
  inset: 0 0 0 68%;
}

.back-editorial .card-back-mark,
.back-editorial .card-back-copy {
  left: 42%;
  width: 58%;
}

.back-split .card-back-accent {
  inset: 0 60% 0 0;
}

.back-split .card-back-mark,
.back-split .card-back-copy {
  left: 68%;
  width: 52%;
}

.back-frame .card-back-accent {
  inset: 7%;
  border: 2px solid var(--card-accent);
  background: transparent;
}

.back-corner .card-back-accent {
  left: 0;
  top: 0;
  width: 19%;
  height: 29%;
}

.back-corner::after {
  right: 0;
  bottom: 0;
  width: 19%;
  height: 29%;
}

.back-band .card-back-accent {
  inset: auto 0 0;
  height: 34%;
}

.back-band .card-back-copy {
  top: 46%;
}

.back-band .card-back-copy em {
  position: relative;
  z-index: 1;
  margin-top: 15%;
  color: var(--card-ground);
}

.back-monogram .card-back-accent {
  left: 7%;
  top: 14%;
  bottom: 14%;
  width: 2px;
}

.back-monogram .card-back-mark b {
  font-size: clamp(64px, 13vw, 140px);
  opacity: .5;
}

.back-diagonal .card-back-accent {
  inset: -20% -8% -20% 58%;
  transform: skewX(-17deg);
}

.back-diagonal .card-back-mark,
.back-diagonal .card-back-copy {
  left: 34%;
  width: 56%;
}

.back-grid .card-back-accent {
  left: 7%;
  right: 7%;
  top: 12%;
  height: 2px;
}

.back-grid::after {
  top: 12%;
  bottom: 12%;
  left: 50%;
  width: 1px;
  opacity: .64;
}

.card-accent {
  position: absolute;
  background: var(--card-accent);
}

.card-main-copy,
.card-contact-copy {
  position: absolute;
  z-index: 1;
}

.card-main-copy strong,
.card-main-copy span,
.card-contact-copy span {
  display: block;
}

.card-main-copy strong {
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: clamp(21px, 3vw, 36px);
  line-height: 1;
}

.card-main-copy span {
  margin-top: 8px;
  color: var(--card-accent);
  font-size: clamp(7px, 1vw, 11px);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.card-contact-copy {
  display: grid;
  gap: 4px;
  font-size: clamp(7px, 1vw, 10px);
}

.business-card-preview > b {
  position: absolute;
  display: none;
  color: var(--card-ground);
  font-family: Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: clamp(25px, 4vw, 48px);
}

.template-minimal .card-accent {
  inset: 0 auto 0 0;
  width: 4%;
}

.template-minimal .card-main-copy {
  left: 10%;
  top: 19%;
}

.template-minimal .card-contact-copy {
  left: 10%;
  bottom: 17%;
}

.template-centered .card-accent {
  left: 38%;
  right: 38%;
  top: 61%;
  height: 2px;
}

.template-centered .card-main-copy {
  left: 8%;
  right: 8%;
  top: 32%;
  text-align: center;
}

.template-centered .card-contact-copy {
  left: 8%;
  right: 8%;
  bottom: 12%;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.template-centered .card-contact-copy span:nth-child(2) {
  display: none;
}

.template-editorial .card-accent {
  inset: 0 0 0 68%;
}

.template-editorial .card-main-copy {
  left: 8%;
  top: 19%;
}

.template-editorial .card-contact-copy {
  left: 8%;
  bottom: 16%;
}

.template-editorial > b {
  right: 9%;
  top: 42%;
  display: block;
  transform: translateY(-50%);
}

.template-split .card-accent {
  inset: 0 60% 0 0;
}

.template-split .card-main-copy,
.template-split .card-contact-copy {
  left: 48%;
}

.template-split .card-main-copy {
  top: 20%;
}

.template-split .card-contact-copy {
  bottom: 17%;
}

.template-split > b {
  left: 20%;
  top: 50%;
  display: block;
  transform: translate(-50%, -50%);
}

.template-frame .card-accent {
  inset: 7%;
  border: 2px solid var(--card-accent);
  background: transparent;
}

.template-frame .card-main-copy {
  left: 9%;
  right: 9%;
  top: 28%;
  text-align: center;
}

.template-frame .card-contact-copy {
  left: 9%;
  right: 9%;
  bottom: 14%;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.template-frame .card-contact-copy span:nth-child(2) {
  display: none;
}

.template-corner::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 19%;
  height: 29%;
  background: var(--card-accent);
  content: "";
}

.template-corner .card-accent {
  left: 0;
  top: 0;
  width: 19%;
  height: 29%;
}

.template-corner .card-main-copy {
  left: 10%;
  top: 25%;
}

.template-corner .card-contact-copy {
  left: 10%;
  bottom: 15%;
}

.template-band .card-accent {
  inset: auto 0 0;
  height: 34%;
}

.template-band .card-main-copy {
  left: 9%;
  top: 18%;
}

.template-band .card-contact-copy {
  left: 9%;
  right: 9%;
  bottom: 12%;
  display: flex;
  justify-content: space-between;
  color: var(--card-ground);
}

.template-band .card-contact-copy span {
  color: inherit;
}

.template-monogram .card-accent {
  left: 7%;
  top: 14%;
  bottom: 14%;
  width: 2px;
}

.template-monogram .card-main-copy {
  left: 12%;
  top: 22%;
}

.template-monogram .card-contact-copy {
  left: 12%;
  bottom: 16%;
}

.template-monogram > b {
  right: 5%;
  top: 48%;
  display: block;
  color: var(--card-accent);
  font-size: clamp(58px, 10vw, 116px);
  opacity: .38;
  transform: translateY(-50%);
}

.template-diagonal .card-accent {
  inset: -20% -8% -20% 58%;
  transform: skewX(-17deg);
}

.template-diagonal .card-main-copy {
  left: 8%;
  top: 21%;
}

.template-diagonal .card-contact-copy {
  left: 8%;
  bottom: 16%;
}

.template-diagonal > b {
  right: 8%;
  top: 50%;
  display: block;
  transform: translateY(-50%);
}

.template-grid::after {
  position: absolute;
  z-index: 0;
  top: 12%;
  bottom: 12%;
  left: 44%;
  width: 1px;
  background: var(--card-accent);
  content: "";
  opacity: .64;
}

.template-grid .card-accent {
  left: 7%;
  right: 7%;
  top: 12%;
  height: 2px;
}

.template-grid .card-main-copy {
  left: 8%;
  top: 27%;
  max-width: 31%;
}

.template-grid .card-main-copy strong {
  font-size: clamp(17px, 2.5vw, 31px);
}

.template-grid .card-contact-copy {
  left: 51%;
  top: 29%;
  bottom: auto;
  gap: 8px;
}

.card-production-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 15px;
  overflow: hidden;
}

.card-production-specs > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 8px;
  padding: 14px 12px;
  border-right: 1px solid #e2dbcf;
}

.card-production-specs > div:last-child {
  border-right: 0;
}

.card-production-specs span {
  width: 22px;
  height: 22px;
  display: grid;
  grid-row: span 2;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2d8966;
}

.card-production-specs svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.card-production-specs strong,
.card-production-specs small {
  display: block;
}

.card-production-specs strong {
  font-size: 8.5px;
}

.card-production-specs small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7.5px;
}

.card-proof-disclaimer {
  margin: 12px 4px 0 !important;
  color: #787f86 !important;
  font-size: 8px !important;
  text-align: center;
}

.studio-footer {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-top: 1px solid #cfc7b9;
  padding: 10px 30px;
  color: #687582;
  background: #eee9df;
  font-size: 8px;
}

.studio-footer span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.studio-footer span:last-child {
  margin-left: auto;
  color: #8c7441;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.studio-footer svg {
  width: 12px;
  height: 12px;
  fill: #347a5e;
}

@media (max-width: 1120px) {
  .simple-modal.tool-studio-modal {
    width: min(100%, 980px);
  }

  .studio-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .studio-controls {
    padding: 24px;
  }

  .studio-stage {
    padding: 24px;
  }

  .preflight-checks {
    grid-template-columns: repeat(3, 1fr);
  }

  .preflight-check:nth-child(3) {
    border-right: 0;
  }

  .preflight-check:nth-child(n + 4) {
    border-top: 1px solid #e6dfd3;
  }

  .card-production-specs {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-production-specs > div:nth-child(2) {
    border-right: 0;
  }

  .card-production-specs > div:nth-child(n + 3) {
    border-top: 1px solid #e2dbcf;
  }

  .template-library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .modal-backdrop:has(.tool-studio-modal) {
    padding: 0;
  }

  .simple-modal.tool-studio-modal {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .studio-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    padding: 36px 68px 28px 24px;
  }

  .studio-engine-state {
    min-width: 0;
  }

  .studio-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .studio-tabs::-webkit-scrollbar {
    display: none;
  }

  .studio-tab {
    min-width: 175px;
    flex: 0 0 auto;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .studio-controls {
    border-right: 0;
    border-bottom: 1px solid var(--studio-line);
  }

  .studio-stage {
    min-height: 520px;
  }

  .studio-empty-state {
    min-height: 470px;
  }

  .studio-artboard {
    height: 430px;
  }

  .template-library-backdrop {
    padding: 0;
  }

  .template-library-panel {
    width: 100%;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .template-library-header {
    padding: 22px 24px 19px;
  }

  .template-library-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px 24px;
  }

  .template-search {
    min-width: 0;
  }

  .template-category-tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .template-category-tabs button {
    flex: 0 0 auto;
  }

  .template-library-meta {
    padding-right: 24px;
    padding-left: 24px;
  }

  .template-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 580px) {
  .studio-header h2,
  .simple-modal.tool-studio-modal .studio-header h2 {
    font-size: 36px;
  }

  .studio-header p:last-child {
    font-size: 12px;
  }

  .studio-tab {
    min-width: 145px;
    font-size: 10px;
  }

  .studio-controls,
  .studio-stage {
    padding: 18px;
  }

  .studio-empty-state {
    min-height: 420px;
    padding: 32px 20px;
  }

  .studio-empty-state h3 {
    font-size: 24px;
  }

  .studio-empty-state ul {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .studio-artboard {
    height: 330px;
    padding: 12px;
  }

  .upscale-proof-head {
    flex-direction: column;
    gap: 7px;
  }

  .upscale-proof-head small {
    max-width: none;
    text-align: left;
  }

  .upscale-gain-grid {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  }

  .upscale-gain-badge {
    grid-column: 1 / -1;
    border-top: 1px solid #ddd6ca;
    border-left: 0;
    padding-top: 9px;
    padding-left: 0;
  }

  .pixel-proof-grid {
    grid-template-columns: 1fr;
  }

  .pixel-proof-window {
    height: 235px;
  }

  .pixel-proof-controls {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pixel-proof-controls p {
    text-align: left;
  }

  .template-library-header span,
  .template-library-meta span {
    display: none;
  }

  .template-library-header h3 {
    font-size: 28px;
  }

  .template-library-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 8px 16px 24px;
  }

  .template-library-header,
  .template-library-toolbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .template-library-meta {
    padding-right: 16px;
    padding-left: 16px;
  }

  .studio-preview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .studio-preview-head > small {
    text-align: left;
  }

  .card-preview-side-tools {
    width: 100%;
    justify-items: start;
    margin-top: 5px;
  }

  .card-preview-side-tools > small {
    text-align: left;
  }

  .studio-result-bar,
  .studio-result-bar > div:last-child {
    align-items: stretch;
    flex-direction: column;
  }

  .studio-result-bar > div:last-child {
    width: 100%;
  }

  .studio-result-bar .button {
    width: 100%;
    text-align: center;
  }

  .preflight-checks {
    grid-template-columns: 1fr;
  }

  .preflight-check,
  .preflight-check:nth-child(3) {
    border-right: 0;
  }

  .preflight-check:nth-child(n + 2) {
    border-top: 1px solid #e6dfd3;
  }

  .preflight-check small {
    display: block;
    margin-top: 2px;
    white-space: normal;
  }

  .card-proof-surface {
    min-height: 320px;
    padding: 42px 16px;
  }

  .card-bleed-guide {
    width: 100%;
  }

  .card-main-copy strong {
    font-size: 18px;
  }

  .card-main-copy span,
  .card-contact-copy {
    font-size: 6px;
  }

  .card-back-mark b {
    font-size: 40px;
  }

  .card-back-copy strong {
    font-size: 12px;
  }

  .card-back-copy span,
  .card-back-copy em {
    font-size: 5.5px;
  }

  .card-production-specs {
    grid-template-columns: 1fr;
  }

  .card-production-specs > div {
    border-right: 0;
  }

  .card-production-specs > div:nth-child(n + 2) {
    border-top: 1px solid #e2dbcf;
  }

  .studio-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 15px 18px;
  }

  .studio-footer span:last-child {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-spinner,
  .studio-processing-track i {
    animation-duration: 1.8s;
  }

  .card-flip-inner {
    transition: none;
  }
}
