.so-heading {
  max-width: 900px;
  margin: 32px 0 40px;
}
.so-heading h1 {
  font-size: clamp(30px, 4vw, 56px);
  margin: 12px 0 20px;
}
/* Long product names wrap instead of widening the page on narrow phones. */
.so-page h1,
.so-page h2 {
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.so-product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.so-gallery {
  position: sticky;
  top: 24px;
  min-width: 0;
}
.so-gallery > img {
  width: 100%;
  height: 520px;
  max-height: 65vh;
  object-fit: contain;
  background: #f3f4f2;
  border-radius: 24px;
}
.so-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow: auto;
}
.so-thumbs button {
  width: 88px;
  height: 76px;
  flex-shrink: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 4px;
  background: #f4f5f3;
  cursor: pointer;
}
.so-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.so-thumbs .selected {
  border-color: #e6774c;
}
.so-calculator {
  background: #f5f4f0;
  padding: 30px;
  border-radius: 24px;
  min-width: 0;
}
.so-calculator h2 {
  margin: 8px 0 24px;
  font-size: 30px;
}
.so-calculator label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
  min-width: 0;
}
.so-calculator input,
.so-calculator select,
.so-calculator textarea {
  font: inherit;
  font-weight: 400;
  padding: 12px;
  border: 1px solid #d4d5d0;
  border-radius: 9px;
  background: white;
  color: #292e2a;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
/* Safari lets long option text widen the page; keep it inside the field. */
.so-calculator select {
  overflow: hidden;
  text-overflow: ellipsis;
}
.so-calculator input[aria-invalid='true'] {
  border-color: #b4532a;
  box-shadow: 0 0 0 1px #b4532a;
}
.so-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.so-fields label:only-child {
  grid-column: 1/-1;
}
.so-price {
  border-top: 1px solid #d5d7d0;
  border-bottom: 1px solid #d5d7d0;
  padding: 22px 0;
  margin: 10px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.so-price strong {
  font-size: 32px;
}
/* A hint instead of a price («Укажите количество…», «Рассчитает менеджер»). */
.so-price strong.so-total-note {
  font-size: 22px;
  line-height: 1.3;
}
.so-price small {
  font-size: 14px;
}
.so-param-note {
  margin: -4px 0 18px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff4e5;
  color: #6b3d12;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}
.so-design {
  font-size: 15px;
  margin: 12px 0;
}
.so-template-link {
  display: inline-block;
  margin-bottom: 24px;
  text-decoration: underline;
}
.so-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin: 60px 0;
  padding: 38px;
  background: #f5f4f0;
  border-radius: 22px;
}
.so-about p,
.so-about li,
.so-templates > p,
.so-steps p {
  font-size: 18px;
  line-height: 1.65;
}
.so-about ul {
  padding-left: 22px;
}
.so-about li {
  margin: 10px 0;
}
.so-template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0 54px;
}
.so-template {
  background: white;
  border: 2px solid #e5e6df;
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  min-width: 0;
}
.so-template img {
  width: 100%;
  height: 225px;
  object-fit: contain;
  display: block;
  background: #f6f6f3;
  border-radius: 8px;
  margin-bottom: 14px;
}
.so-template b,
.so-template small {
  display: block;
  overflow-wrap: anywhere;
}
.so-template small {
  font-size: 13px;
  color: #62695e;
  margin-top: 5px;
}
.so-template.selected {
  border-color: #e6774c;
  background: #fff8f2;
}
.so-own {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 270px;
}
.so-own span {
  font-size: 30px;
  color: #7d8874;
  margin-bottom: 20px;
}
.so-templates {
  scroll-margin-top: 30px;
}
.so-steps > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.so-steps b {
  font-size: 21px;
}
.so-secondary {
  font: inherit;
  border: 1px solid #afb8a7;
  padding: 13px 20px;
  border-radius: 30px;
  background: white;
  cursor: pointer;
}
/* File chooser (UploadBox): calculators, request pages and the online ID photo. The native input stays
   focusable but is drawn as a button. */
.so-upload-box {
  margin: 0 0 18px;
}
.so-upload-box .so-upload,
.so-calculator .so-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}
.so-upload-button {
  align-self: flex-start;
  border: 1px solid #afb8a7;
  border-radius: 30px;
  background: #fff;
  padding: 11px 20px;
  font-weight: 600;
  cursor: pointer;
}
.so-upload:hover .so-upload-button {
  border-color: #394f36;
}
.so-upload:focus-within .so-upload-button {
  outline: 3px solid #394f36;
  outline-offset: 3px;
}
.so-upload-box .so-upload input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}
.so-upload-hint {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: #62695e;
}
.so-file-status {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fdeee8;
  color: #8e3e25;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.so-file-status p {
  margin: 0;
}
.so-file-status p + p {
  margin-top: 6px;
}
.so-files:empty {
  display: none;
}
.so-files-actions {
  display: flex;
  gap: 14px;
}
.so-files-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.so-file-clear {
  font: inherit;
  font-size: 13px;
  background: none;
  border: 0;
  padding: 4px 0;
  color: #8e3e25;
  text-decoration: underline;
  cursor: pointer;
}
.so-file-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}
.so-file {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 13px;
}
.so-file img,
.so-file-type {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
}
.so-file-type {
  display: grid;
  place-items: center;
  background: #eef0ea;
  color: #4a5245;
  font-size: 11px;
  font-weight: 700;
}
.so-file-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}
/* How far the upload got: «Загружается · 45 %», «Загружен», «Не принят: …». */
.so-file-state {
  font-size: 12px;
  color: #62695e;
}
.so-file.is-complete .so-file-state {
  color: #2f6b34;
}
.so-file.is-rejected .so-file-state,
.so-file.is-failed .so-file-state,
.so-file.is-needs-reselect .so-file-state {
  color: #8e3e25;
}
.so-file-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #e4e5de;
  overflow: hidden;
}
.so-file-bar span {
  display: block;
  height: 100%;
  background: #394f36;
  transition: width 0.3s;
}
.so-order-status:empty {
  display: none;
}
.so-order-status {
  margin: 12px 0 0;
  color: #8e3e25;
  font-weight: 600;
}
.so-file-size {
  color: #62695e;
  white-space: nowrap;
}
.so-file-remove {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f1ec;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.so-file-remove:hover {
  background: #e4e5de;
}
.so-calculator .ec-note {
  line-height: 1.6;
}
/* What the price covers or what is paid separately (stamps, leaflets, the counter services). */
.so-form-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.55;
}
/* Layout requirements and the designer's offer next to the file chooser of the print pages and requests. */
.so-layout-note {
  margin: 4px 0 16px;
  padding: 14px 16px;
  border: 1px solid #e4e5de;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.55;
}
.so-layout-note ul {
  margin: 6px 0;
  padding-left: 18px;
}
.so-layout-note p {
  margin: 6px 0 0;
}
/* Price tables in the calculator column (pages with prices only) and in the «Цены» section under it. */
.so-calculator .pp-price-table {
  margin: 0 0 18px;
}
.so-calculator .pp-price-table table {
  background: #fff;
}
.so-calculator .pp-price-table caption {
  font-size: 16px;
  padding-bottom: 10px;
}
/* «1 000 шт.», «30×40 см» and the column headers («Формат», «1–20») stay on one line on phones. */
.so-price-table tbody th,
.so-price-table thead th {
  white-space: nowrap;
  -webkit-hyphens: manual;
  hyphens: manual;
}
@media (max-width: 480px) {
  .so-price-table th,
  .so-price-table td {
    padding: 10px 8px;
  }
}
.so-price-table-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: #62695e;
}
.so-prices {
  margin: 60px 0 0;
}
.so-prices .pp-price-table {
  margin: 16px 0 0;
}
.so-info .ec-manager-actions {
  margin-top: 8px;
}
/* The request form: what happens after «Оставить заявку». */
.ec-request .ec-request-note {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: inherit;
}
.so-calculator .btn {
  width: 100%;
}
.so-page button:focus-visible,
.so-page a:focus-visible {
  outline: 3px solid #394f36;
  outline-offset: 3px;
}
@media (max-width: 1000px) {
  .so-product {
    gap: 24px;
  }
  .so-calculator {
    padding: 22px;
  }
  .so-template-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .so-fields {
    grid-template-columns: 1fr;
  }
  .so-gallery > img {
    height: 430px;
  }
}
@media (max-width: 720px) {
  .so-product {
    grid-template-columns: 1fr;
  }
  .so-gallery {
    position: static;
  }
  .so-gallery > img {
    height: 360px;
    max-height: 60vh;
  }
  .so-about {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 25px;
  }
  .so-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .so-template img {
    height: 170px;
  }
  .so-own {
    min-height: 235px;
  }
  .so-steps > div {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .so-fields {
    grid-template-columns: 1fr 1fr;
  }
  .so-review {
    padding: 22px;
  }
}
@media (max-width: 420px) {
  .so-heading h1 {
    font-size: 30px;
    letter-spacing: -1px;
  }
  .so-calculator h2 {
    font-size: 26px;
  }
}
@media (max-width: 400px) {
  .so-fields {
    grid-template-columns: 1fr;
  }
  .so-template img {
    height: 140px;
  }
}

.so-variants {
  margin: 46px 0;
}
.so-variant-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 5px 3px 20px;
  scroll-snap-type: x proximity;
}
.so-variant-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  border: 2px solid #e5e6df;
  background: #fff;
  color: inherit;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.so-variant-card.selected {
  border-color: #e6774c;
  background: #fff8f2;
}
.so-variant-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #f6f6f3;
  border-radius: 8px;
}
.so-variant-card b {
  font-size: 16px;
}
.so-variant-card small {
  font-size: 13px;
  color: #62695e;
}
.so-calculator #so-order-status {
  color: #8e3e25;
  font-weight: 600;
}
.so-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 35px;
}
.so-methods .ec-card-photo {
  height: 320px;
}
.so-methods .ec-card-photo img {
  object-fit: contain;
  background: #f5f4f0;
}
.so-methods .ec-card h2 {
  font-size: 27px;
}
@media (max-width: 650px) {
  .so-methods {
    grid-template-columns: 1fr;
  }
  .so-variant-card {
    flex-basis: 155px;
  }
  .so-variant-card img {
    height: 130px;
  }
}

.so-calculator label[hidden] {
  display: none;
}

.so-product-choices fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  min-width: 0;
}
.so-product-choices fieldset[hidden] {
  display: none;
}
.so-product-choices legend {
  font-weight: 600;
  margin-bottom: 10px;
}
.so-choice-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 3px 3px 12px;
  scroll-snap-type: x proximity;
}
.so-choice {
  flex: 0 0 auto;
  max-width: 230px;
  min-height: 46px;
  border: 2px solid #ded9e4;
  border-radius: 12px;
  background: #fff;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  scroll-snap-align: start;
}
.so-choice.has-image {
  width: 115px;
  padding: 8px;
}
.so-choice img {
  display: block;
  width: 95px;
  height: 95px;
  object-fit: contain;
  margin: 0 auto 8px;
}
.so-choice span {
  display: block;
  line-height: 1.35;
}
.so-choice.selected {
  border-color: #8252c7;
  background: #f6f0fc;
}
.so-choice:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}
.so-product-choices {
  min-width: 0;
  max-width: 100%;
}
.so-calculator {
  min-width: 0;
}

.so-template-dialog {
  border: 0;
  border-radius: 20px;
  padding: 24px;
  width: min(1000px, 94vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  color: var(--ink);
}
.so-template-dialog::backdrop {
  background: #171321b8;
}
.so-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.so-preview-head h2 {
  font-size: 24px;
  margin: 0;
}
.so-preview-head button {
  font-size: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 12px;
}
.so-preview-image {
  background: #f4f2f6;
  border-radius: 12px;
  margin: 18px 0;
  padding: 12px;
  display: flex;
  justify-content: center;
}
.so-preview-image img {
  max-width: 100%;
  max-height: 65vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.so-preview-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.so-preview-actions a {
  font-size: 15px;
}
.so-preview-actions .btn {
  margin-left: auto;
}
@media (max-width: 600px) {
  .so-template-dialog {
    padding: 16px;
  }
  .so-preview-actions .btn {
    width: 100%;
    margin: 0;
  }
  .so-preview-actions .so-secondary {
    flex: 1;
    padding: 10px;
    font-size: 14px;
  }
}

/* ---- Picture choices (owner's edits of 27.10.2026): photobook cover and box colours chosen by picture inside the
   calculator, as on the partner's site, and round arrows on every row of picture choices (computers only:
   design.css hides .strip-arrow without hover). ---- */
.so-choice-scroller {
  position: relative;
}
.so-choice-scroller .strip-arrow {
  width: 38px;
  height: 38px;
  margin-top: -25px;
}
.so-choice-scroller .strip-arrow-prev {
  left: -12px;
}
.so-choice-scroller .strip-arrow-next {
  right: -12px;
}
/* in a row the buttons are as tall as the tallest one; the pictures stay on one line at the top, whatever the
   length of the names under them */
.so-choice.has-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
/* the box colour sits among the two-column parameters and takes the whole width */
.so-fields > .so-work-choices {
  grid-column: 1 / -1;
}
.so-work-choices fieldset {
  margin-bottom: 14px;
}
.so-choice small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
