:root {
  --pt-ink: #1f252b;
  --pt-muted: #68737f;
  --pt-line: #dfe6ea;
  --pt-soft: #f5f7f4;
  --pt-green: #4f9f65;
  --pt-green-dark: #317944;
  --pt-warm: #f6eee4;
  --pt-panel: #ffffff;
}

* { box-sizing: border-box; }

body.photo-tools-page {
  margin: 0;
  background: #f8faf7;
  color: var(--pt-ink);
  font-family: Manrope, Arial, sans-serif;
}

.pt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid var(--pt-line);
  background: rgba(255, 255, 255, .92);
  position: sticky;
  top: 0;
  z-index: 20;
}

.pt-logo {
  color: var(--pt-ink);
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.pt-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 700;
}

.pt-nav a,
.pt-back,
.pt-panel a {
  color: var(--pt-green-dark);
  text-decoration: none;
}

.pt-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 48px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 28px 36px;
}

.pt-kicker {
  margin: 0 0 10px;
  color: var(--pt-green-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.pt-home h1,
.pt-stub h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.pt-lead {
  margin: 22px 0 0;
  max-width: 720px;
  font-size: 22px;
  line-height: 1.45;
}

.pt-muted,
.pt-panel p,
.pt-tool-card p,
.pt-message {
  color: var(--pt-muted);
}

.pt-muted {
  max-width: 680px;
  font-size: 17px;
  line-height: 1.55;
}

.pt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.pt-actions--compact {
  margin-top: 14px;
}

.pt-button,
.pt-segmented button,
.pt-photo-controls button,
.pt-nudge button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pt-ink);
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.pt-button--primary,
.pt-segmented button.is-active,
.pt-photo-controls button.is-active {
  border-color: var(--pt-green);
  background: var(--pt-green);
  color: #fff;
}

.pt-home__preview {
  min-height: 420px;
}

.pt-sample {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  overflow: hidden;
  border: 12px solid #fff;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(22, 31, 38, .12);
}

.pt-sample__pane {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255,255,255,.55), rgba(255,255,255,0)),
    repeating-linear-gradient(45deg, #c2b39c 0 18px, #8f806b 18px 36px);
}

.pt-sample__pane--after {
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.92) 0 22%, rgba(255,255,255,0) 24%),
    linear-gradient(145deg, rgba(255,255,255,.64), rgba(255,255,255,0)),
    repeating-linear-gradient(45deg, #7c8d75 0 18px, #4d6349 18px 36px);
}

.pt-sample span {
  position: absolute;
  left: 20px;
  bottom: 20px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .58);
  color: #fff;
  padding: 8px 14px;
  font-weight: 900;
}

.pt-tools {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 28px 72px;
}

.pt-section-head h2 {
  margin: 0 0 22px;
  font-size: 32px;
}

.pt-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pt-tool-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  background: #fff;
}

.pt-tool-card h3 {
  margin: 0;
  font-size: 22px;
}

.pt-tool-card p {
  flex: 1;
  line-height: 1.5;
}

.pt-stub {
  max-width: 860px;
  margin: 0 auto;
  padding: 84px 28px;
}

.pt-editor {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.pt-panel {
  background: var(--pt-panel);
  border-right: 1px solid var(--pt-line);
  padding: 24px;
  overflow-y: auto;
}

.pt-panel__head h1 {
  margin: 12px 0 8px;
  font-size: 32px;
}

.pt-panel__head p {
  margin: 0 0 20px;
  line-height: 1.5;
  font-size: 14px;
}

.pt-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pt-upload {
  display: flex;
  min-height: 124px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px dashed #aebcc5;
  border-radius: 8px;
  background: #fbfcfb;
  cursor: pointer;
}

.pt-upload.is-filled {
  border-color: var(--pt-green);
  background: #f1faf2;
}

.pt-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.pt-upload__label {
  font-weight: 900;
}

.pt-upload__hint {
  color: var(--pt-muted);
  font-size: 13px;
}

.pt-control-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--pt-line);
}

.pt-control-group h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.pt-control-group label {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  color: #33404c;
  font-size: 14px;
  font-weight: 800;
}

.pt-control-group input[type="text"],
.pt-control-group select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pt-ink);
  padding: 8px 11px;
  font: inherit;
}

.pt-check {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 9px !important;
}

.pt-segmented,
.pt-photo-controls,
.pt-nudge {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.pt-nudge button {
  width: 42px;
  padding: 0;
}

.pt-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  padding: 24px;
}

.pt-preview__bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--pt-muted);
  font-size: 14px;
  font-weight: 800;
}

#beforeAfterCanvas {
  width: 100%;
  max-height: calc(100vh - 150px);
  align-self: center;
  justify-self: center;
  object-fit: contain;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 31, 38, .10);
}

.pt-message {
  min-height: 22px;
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .pt-home,
  .pt-editor {
    grid-template-columns: 1fr;
  }

  .pt-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pt-panel {
    border-right: 0;
    border-bottom: 1px solid var(--pt-line);
  }

  #beforeAfterCanvas {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .pt-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .pt-nav {
    flex-wrap: wrap;
  }

  .pt-home,
  .pt-tools,
  .pt-stub,
  .pt-panel,
  .pt-preview {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pt-tool-grid,
  .pt-upload-grid {
    grid-template-columns: 1fr;
  }

  .pt-home h1,
  .pt-stub h1 {
    font-size: 38px;
  }

  .pt-lead {
    font-size: 18px;
  }

  .pt-preview__bar {
    flex-direction: column;
  }
}


.pt-merc-header {
  position: sticky;
  top: 0;
  z-index: 30;
}

.pt-merc-nav a[href="/tools/photo/"] {
  color: #59ab6e;
}

.pt-subnav {
  position: sticky;
  top: 72px;
  z-index: 25;
  border-bottom: 1px solid var(--pt-line);
  background: rgba(255, 255, 255, .94);
}

.pt-subnav .merceri-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 48px;
}

.pt-subnav a {
  border: 1px solid #dfe6ea;
  border-radius: 8px;
  background: #fff;
  color: #314047;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.photo-tools-page .site-footer {
  margin-top: 0;
}

@media (max-width: 640px) {
  .pt-subnav {
    position: static;
  }
}


.photo-tools-page .footer-cta {
  display: none;
}


.pt-publish {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  background: #f8faf7;
}

.pt-publish input,
.pt-publish textarea,
.pt-result-panel input,
.pt-result-panel textarea {
  width: 100%;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--pt-ink);
  font: inherit;
}

.pt-result {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 28px 72px;
}

.pt-result__head h1 {
  margin: 12px 0 8px;
  font-size: clamp(34px, 5vw, 60px);
}

.pt-result__head p {
  color: var(--pt-muted);
}

.pt-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.pt-result-panel {
  padding: 20px;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  background: #fff;
}

.pt-result-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 800;
}

.pt-comparison {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  touch-action: none;
  border: 12px solid #fff;
  border-radius: 8px;
  background: #e9eee8;
  box-shadow: 0 18px 50px rgba(22, 31, 38, .12);
}

.pt-comparison__img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.pt-comparison__before,
.pt-comparison__after,
.pt-comparison__line,
.pt-comparison__handle,
.pt-comparison__label,
.pt-comparison__brand {
  position: absolute;
}

.pt-comparison__before,
.pt-comparison__after {
  inset: 0;
}

.pt-comparison__line {
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(31, 37, 43, .14);
}

.pt-comparison__handle {
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border: 4px solid #fff;
  border-radius: 50%;
  background: rgba(31, 37, 43, .78);
  cursor: ew-resize;
}

.pt-comparison__handle::before,
.pt-comparison__handle::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 10px;
  height: 10px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
}

.pt-comparison__handle::before {
  left: 13px;
  transform: rotate(-45deg);
}

.pt-comparison__handle::after {
  right: 13px;
  transform: rotate(135deg);
}

.pt-comparison__label {
  bottom: 22px;
  z-index: 3;
  border-radius: 8px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  padding: 8px 14px;
  font-weight: 900;
}

.pt-comparison__label--before {
  left: 22px;
}

.pt-comparison__label--after {
  right: 22px;
}

.pt-comparison__brand {
  right: 22px;
  top: 22px;
  z-index: 3;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: var(--pt-ink);
  padding: 8px 12px;
  text-align: right;
  font-weight: 900;
}

.pt-comparison__brand small {
  display: block;
  color: var(--pt-muted);
  font-size: 12px;
}

.photo-tools-embed {
  margin: 0;
  background: transparent;
  font-family: Manrope, Arial, sans-serif;
}

.photo-tools-embed .pt-comparison {
  height: 100vh;
  min-height: 280px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 980px) {
  .pt-result-grid {
    grid-template-columns: 1fr;
  }
}


.pt-static-result {
  overflow: hidden;
  border: 12px solid #fff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 31, 38, .12);
}

.pt-static-result img {
  display: block;
  width: 100%;
  height: auto;
}


/* UI/UX refresh for the Before/After editor. */
.pt-ba-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 28px 96px;
}

.pt-ba-hero {
  padding: 18px 0 22px;
}

.pt-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #7a685d;
  font-size: 14px;
  font-weight: 700;
}

.pt-crumbs a {
  color: #4a2519;
  text-decoration: none;
}

.pt-ba-hero__grid,
.pt-section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 28px;
  align-items: end;
}

.pt-ba-hero h1 {
  max-width: 780px;
  margin: 0;
  color: #3a2016;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
}

.pt-privacy-note,
.pt-mini-guide,
.pt-info-note,
.pt-compatibility {
  border: 1px solid #e7ded4;
  border-radius: 16px;
  background: #fffaf4;
  padding: 16px 18px;
  color: #604d43;
}

.pt-privacy-note {
  display: grid;
  gap: 6px;
}

.pt-privacy-note strong,
.pt-mini-guide strong,
.pt-compatibility strong {
  color: #3a2016;
}

.pt-privacy-note a {
  color: #4f9f65;
  font-weight: 900;
  text-decoration: none;
}

.pt-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
}

.pt-stepper li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border: 1px solid #e2d8ce;
  border-radius: 16px;
  background: #fff;
  padding: 10px 14px;
  color: #7a685d;
  font-weight: 900;
}

.pt-stepper span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f1e7d8;
  color: #4a2519;
}

.pt-stepper li.is-active {
  border-color: #4a2519;
  color: #3a2016;
  box-shadow: 0 12px 30px rgba(58, 32, 22, .08);
}

.pt-stepper li.is-done span {
  background: #4f9f65;
  color: #fff;
}

.pt-mobile-step {
  display: none;
  color: #7a685d;
  font-weight: 900;
}

.pt-step-section {
  display: none;
}

.pt-step-section.is-active {
  display: block;
}

.pt-section-head {
  margin-bottom: 18px;
}

.pt-section-head h2 {
  margin: 0 0 8px;
  color: #3a2016;
  font-size: clamp(28px, 4vw, 42px);
}

.pt-section-head p {
  margin: 0;
  color: #68737f;
  font-size: 16px;
  line-height: 1.5;
}

.pt-upload-grid--large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pt-upload-card {
  position: relative;
  min-height: 290px;
  border: 1px dashed #d8cbbf;
  border-radius: 20px;
  background: #fff;
  padding: 24px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.pt-upload-card:hover,
.pt-upload-card.is-dragover {
  border-color: #4f9f65;
  background: #fbfefb;
  box-shadow: 0 16px 38px rgba(38, 59, 42, .08);
}

.pt-upload-card.is-loading::after {
  content: "Подготавливаем фотографии";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255,255,255,.82);
  color: #3a2016;
  font-weight: 900;
}

.pt-upload-card input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.pt-upload-card__empty,
.pt-upload-card__filled {
  display: grid;
  gap: 14px;
  height: 100%;
}

.pt-upload-card__empty {
  align-content: center;
}

.pt-upload-card__badge {
  width: fit-content;
  border-radius: 999px;
  background: #f1e7d8;
  color: #4a2519;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 900;
}

.pt-upload-card h3 {
  margin: 0;
  max-width: 420px;
  color: #263038;
  font-size: 24px;
  line-height: 1.25;
}

.pt-upload-card p {
  margin: 0;
  color: #68737f;
  line-height: 1.5;
}

.pt-upload-card__filled {
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
}

.pt-upload-card__filled img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #e4e8eb;
}

.pt-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pt-upload-card__drop {
  display: none;
  position: absolute;
  inset: 14px;
  place-items: center;
  border-radius: 16px;
  background: rgba(79, 159, 101, .92);
  color: #fff !important;
  font-size: 22px;
  font-weight: 900;
}

.pt-upload-card.is-dragover .pt-upload-card__drop {
  display: grid;
}

.pt-field-error {
  min-height: 20px;
  margin-top: 12px !important;
  color: #a33b2f !important;
  font-weight: 800;
}

.pt-compatibility {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

.pt-compatibility.is-good {
  border-color: #b9dcc1;
  background: #f1faf2;
}

.pt-compatibility.is-warning {
  border-color: #ead3a8;
  background: #fff9eb;
}

.pt-step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.pt-editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 22px;
  align-items: start;
}

.pt-preview--workspace {
  min-height: 620px;
  border: 1px solid #e2d8ce;
  border-radius: 20px;
  background: #f3f5f2;
  padding: 18px;
}

.pt-canvas-wrap {
  display: grid;
  min-height: 540px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f7f4ef);
  padding: 18px;
}

.pt-canvas-wrap canvas {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border: 1px solid #e1e6e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 31, 38, .10);
  touch-action: none;
}

.pt-panel--tabs {
  position: sticky;
  top: 132px;
  max-height: calc(100vh - 154px);
  overflow: auto;
  border: 1px solid #e2d8ce;
  border-radius: 20px;
  background: #fff;
  padding: 14px;
}

.pt-tab-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.pt-tab-list button {
  min-height: 44px;
  border: 1px solid #e2d8ce;
  border-radius: 12px;
  background: #fff;
  color: #3a2016;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.pt-tab-list button.is-active {
  border-color: #4a2519;
  background: #4a2519;
  color: #fff;
}

.pt-tab-panel {
  display: none;
  padding: 4px 4px 12px;
}

.pt-tab-panel.is-active {
  display: block;
}

.pt-tab-panel h3 {
  margin: 4px 0 12px;
  color: #3a2016;
  font-size: 22px;
}

.pt-tab-panel label {
  display: grid;
  gap: 8px;
  margin: 13px 0;
  color: #33404c;
  font-size: 14px;
  font-weight: 900;
}

.pt-tab-panel input[type="text"],
.pt-tab-panel select,
.pt-editor-bottom select {
  min-height: 44px;
  width: 100%;
  border: 1px solid #dfe6ea;
  border-radius: 12px;
  background: #fff;
  padding: 9px 12px;
  color: #1f252b;
  font: inherit;
}

.pt-tab-panel output {
  justify-self: end;
  color: #7a685d;
}

.pt-photo-controls {
  align-items: center;
}

.pt-help {
  color: #68737f;
  font-size: 13px;
  line-height: 1.45;
}

.pt-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pt-preset-grid button {
  display: grid;
  gap: 6px;
  justify-items: start;
  border: 1px solid #e2d8ce;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  color: #263038;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.pt-preset-grid button.is-active {
  border-color: #4f9f65;
  box-shadow: 0 0 0 3px rgba(79,159,101,.16);
}

.pt-ratio {
  display: block;
  width: 34px;
  border: 2px solid #4a2519;
  border-radius: 5px;
}

.pt-ratio--square { height: 34px; }
.pt-ratio--portrait { height: 42px; }
.pt-ratio--story { height: 50px; }
.pt-ratio--wide { height: 20px; }

.pt-editor-bottom {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  border: 1px solid #e2d8ce;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  padding: 12px;
  box-shadow: 0 -10px 30px rgba(22,31,38,.08);
}

.pt-editor-bottom__primary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.pt-editor-bottom__primary label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #68737f;
  font-size: 13px;
  font-weight: 900;
}

.pt-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.pt-button:focus-visible,
.pt-tab-list button:focus-visible,
.pt-preset-grid button:focus-visible,
.pt-upload-card:focus-within {
  outline: 3px solid rgba(79,159,101,.35);
  outline-offset: 2px;
}

.pt-button.is-loading {
  min-width: 166px;
}

.pt-message.is-error {
  color: #a33b2f;
}

.pt-result-ready {
  border: 1px solid #e2d8ce;
  border-radius: 20px;
  background: #fff;
  padding: 24px;
}

.pt-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.pt-result-link {
  display: grid;
  gap: 8px;
  color: #33404c;
  font-weight: 900;
}

.pt-result-link span {
  display: flex;
  gap: 8px;
}

.pt-result-link input {
  flex: 1;
  min-width: 0;
  border: 1px solid #dfe6ea;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.pt-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(31,37,43,.48);
  padding: 20px;
}

.pt-modal[hidden] {
  display: none;
}

.pt-modal__panel {
  width: min(620px, 100%);
  border-radius: 20px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

.pt-modal__panel textarea {
  width: 100%;
  border: 1px solid #dfe6ea;
  border-radius: 12px;
  padding: 12px;
  font: 14px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.pt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.pt-tool-card--featured {
  border-color: #d8cbbf;
  background: #fffaf4;
  box-shadow: 0 16px 40px rgba(58,32,22,.08);
}

.pt-tool-label {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #4f9f65;
  color: #fff;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1060px) {
  .pt-editor-shell,
  .pt-ba-hero__grid,
  .pt-section-head--split {
    grid-template-columns: 1fr;
  }

  .pt-panel--tabs {
    position: static;
    max-height: none;
  }

  .pt-tab-list {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .pt-ba-page {
    padding: 22px 16px 110px;
  }

  .pt-stepper {
    display: none;
  }

  .pt-mobile-step {
    display: block;
  }

  .pt-upload-grid--large,
  .pt-preset-grid {
    grid-template-columns: 1fr;
  }

  .pt-upload-card__filled {
    grid-template-columns: 1fr;
  }

  .pt-upload-card__filled img {
    width: 100%;
    height: 190px;
  }

  .pt-preview--workspace {
    min-height: 0;
    padding: 12px;
  }

  .pt-canvas-wrap {
    min-height: 420px;
    padding: 10px;
  }

  .pt-editor-bottom {
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    margin-left: -16px;
    margin-right: -16px;
  }

  .pt-editor-bottom__primary {
    width: 100%;
    margin-left: 0;
  }

  .pt-editor-bottom__primary .pt-button--primary {
    width: 100%;
  }

  .pt-result-link span {
    flex-direction: column;
  }
}


.pt-created-result-inline {
  margin-top: 18px;
  border: 1px solid #b9dcc1;
  border-radius: 18px;
  background: #f1faf2;
  padding: 20px;
  color: #263038;
}

.pt-created-result-inline h2 {
  margin: 0 0 8px;
  color: #1f252b;
  font-size: 28px;
}

.pt-created-result-inline p {
  margin: 0 0 14px;
  color: #68737f;
}

.pt-created-result-inline label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  color: #33404c;
  font-size: 14px;
  font-weight: 900;
}

.pt-created-result-inline input,
.pt-created-result-inline textarea {
  width: 100%;
  border: 1px solid #cddbd1;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: #1f252b;
  font: inherit;
}

.pt-created-result-inline textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}


.pt-editor-step {
  margin-top: 34px;
  padding-top: 10px;
  scroll-margin-top: 150px;
}

.pt-step-actions {
  clear: both;
  width: 100%;
  justify-content: flex-start;
  margin: 22px 0 8px;
  padding: 14px 0 0;
  position: relative;
  z-index: 1;
}

.pt-step-actions .pt-button {
  min-width: 220px;
  white-space: nowrap;
}

.pt-upload-card__filled {
  grid-template-columns: minmax(112px, 130px) minmax(0, 1fr);
}

.pt-upload-card__filled h3 {
  padding-right: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 721px) {
  .pt-upload-grid--large {
    align-items: stretch;
  }
}


/* Hard reset for hidden editor/upload states. Keep this at the end. */
.pt-ba-page [hidden],
.pt-upload-card__empty[hidden],
.pt-upload-card__filled[hidden],
.pt-step-section[hidden],
.pt-modal[hidden] {
  display: none !important;
}

.pt-upload-card {
  overflow: hidden;
}

.pt-upload-card__filled[hidden] + *,
.pt-upload-card__empty[hidden] + * {
  margin-top: 0;
}

.pt-step-actions {
  position: static !important;
  z-index: auto !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center;
  width: 100%;
  clear: both;
  margin: 22px 0 34px !important;
  padding-top: 0 !important;
}

.pt-step-actions .pt-button {
  flex: 0 0 auto;
  min-width: 220px;
  white-space: nowrap;
}

.pt-editor-step {
  margin-top: 34px;
  scroll-margin-top: 150px;
}

.pt-upload-grid--large {
  align-items: stretch;
}

.pt-upload-card__filled {
  min-height: 130px;
  height: auto;
}

.pt-upload-card__filled > div {
  min-width: 0;
}

.pt-upload-card__filled h3 {
  margin-right: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

@media (max-width: 720px) {
  .pt-step-actions .pt-button {
    width: 100%;
  }
}

.pt-result-modal__panel {
  position: relative;
  display: grid;
  gap: 12px;
}

.pt-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid #e2d8ce;
  border-radius: 999px;
  background: #fff;
  color: #3a2016;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.pt-result-modal label {
  display: grid;
  gap: 8px;
  color: #33404c;
  font-size: 14px;
  font-weight: 900;
}

.pt-result-modal input,
.pt-result-modal textarea {
  width: 100%;
  border: 1px solid #dfe6ea;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: #1f252b;
  font: inherit;
}

.pt-result-modal textarea {
  min-height: 116px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}


.pt-comparison--aligned .pt-comparison__img {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: none;
}

.pt-comparison--aligned {
  aspect-ratio: 1 / 1;
}


.pt-studio-controls {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.pt-studio-controls[hidden] {
  display: none;
}

.pt-comparison--studio {
  background: #efefeb;
}


.pt-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.pt-button--guide {
  margin-top: 14px;
}

.pt-guide-modal__panel {
  max-width: 860px;
  max-height: min(86vh, 820px);
  overflow: auto;
}

.pt-guide-lead {
  color: #5d655a;
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 18px;
}

.pt-guide-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pt-guide-grid section {
  background: #f8faf7;
  border: 1px solid #dfe7dc;
  border-radius: 8px;
  padding: 16px;
}

.pt-guide-grid h3 {
  color: #2f3a2c;
  font-size: 17px;
  margin: 0 0 10px;
}

.pt-guide-grid ul {
  margin: 0;
  padding-left: 18px;
}

.pt-guide-grid li {
  margin: 6px 0;
}

.pt-guide-note {
  background: #fff9eb;
  border: 1px solid #ead8aa;
  border-radius: 8px;
  color: #3a2d17;
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 14px 16px;
}

@media (max-width: 760px) {
  .pt-section-actions {
    justify-content: flex-start;
  }

  .pt-guide-grid {
    grid-template-columns: 1fr;
  }
}
