:root {
  color-scheme: light;
  --bg: #f9f6f1;
  --surface: #fffdf9;
  --ink: #151515;
  --muted: #807a72;
  --line: #ebe4da;
  --accent: #111111;
  --shadow: 0 14px 34px rgba(42, 34, 25, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.quiz-shell {
  position: relative;
  display: flex;
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 22px max(14px, env(safe-area-inset-bottom));
  flex-direction: column;
}

.page-back-link {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 10px;
  z-index: 3;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.page-back-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.page-back-link[hidden] {
  display: none;
}

.page-back-icon {
  display: block;
  width: 13px;
  height: 13px;
  margin-left: 4px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.screen-header {
  padding: 2px 2px 14px;
  text-align: center;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-bottom: 12px;
}

.brand-logo {
  display: block;
  width: min(68vw, 255px);
  height: auto;
}

.site-footer {
  display: grid;
  width: min(100%, 480px);
  gap: 18px;
  margin: 0 auto;
  padding: 34px 22px max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink);
}

body.product-cart-visible .site-footer {
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
}

.site-footer-logo {
  display: block;
  width: min(52vw, 188px);
  height: auto;
}

.site-footer-description {
  max-width: 35ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 430;
  line-height: 1.42;
}

.site-footer-details {
  border-bottom: 1px solid var(--line);
}

.site-footer-details summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.2;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.site-footer-details summary::-webkit-details-marker {
  display: none;
}

.site-footer-arrow {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.site-footer-arrow::before,
.site-footer-arrow::after {
  position: absolute;
  top: 8px;
  width: 10px;
  height: 1.5px;
  border-radius: 999px;
  background: var(--ink);
  content: "";
  transition: transform 0.2s ease;
}

.site-footer-arrow::before {
  left: 1px;
  transform: rotate(45deg);
}

.site-footer-arrow::after {
  right: 1px;
  transform: rotate(-45deg);
}

.site-footer-details[open] .site-footer-arrow::before {
  transform: rotate(-45deg);
}

.site-footer-details[open] .site-footer-arrow::after {
  transform: rotate(45deg);
}

.site-footer-contacts {
  display: grid;
  gap: 9px;
  padding: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 430;
  line-height: 1.35;
}

.site-footer-contacts p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.site-footer-contacts span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  text-transform: uppercase;
}

.site-footer-socials {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.site-footer-social-title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  text-transform: uppercase;
}

.site-footer-social-list {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer-social-link {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf9;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.site-footer-social-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.site-footer-social-link img {
  display: block;
  width: 17px;
  height: 17px;
}

.site-footer-links {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 0 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.2;
  scrollbar-width: none;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.site-footer-links::-webkit-scrollbar {
  display: none;
}

.site-footer-links a {
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.site-footer-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1;
}

.site-footer-copy-icon {
  display: inline;
  font-size: 10px;
  font-weight: 620;
  line-height: 1;
}

.legal-shell {
  min-height: auto;
  padding-bottom: 26px;
}

.legal-brand {
  padding-top: 4px;
}

.legal-page {
  display: grid;
  gap: 18px;
  padding-top: 8px;
}

.legal-page h1 {
  max-width: none;
  margin: 0;
  font-size: 28px;
  font-weight: 430;
  line-height: 1.08;
  text-align: left;
}

.legal-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-section {
  display: grid;
  gap: 8px;
}

.legal-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.2;
}

.legal-section h3 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.25;
}

.legal-section p,
.legal-section li {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 430;
  line-height: 1.45;
}

.legal-section ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  margin: 0;
}

.legal-note {
  padding: 12px;
  border-radius: 8px;
  background: #f1ece4;
  color: var(--muted);
  font-size: 13px;
  font-weight: 480;
  line-height: 1.35;
}

h1 {
  max-width: 18ch;
  margin: 0 auto;
  color: var(--ink);
  font-size: clamp(24px, 6vw, 31px);
  font-weight: 340;
  line-height: 1.12;
  letter-spacing: 0;
}

.page-title {
  max-width: 21ch;
  font-size: clamp(22px, 5.3vw, 27px);
}

.format-list {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.format-card {
  display: flex;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-direction: column;
}

.format-card:focus-within,
.format-card:hover {
  border-color: rgba(17, 17, 17, 0.34);
}

.format-choice {
  display: block;
  min-width: 0;
  border-radius: 6px;
  text-decoration: none;
}

.format-choice:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.format-image h2 {
  position: absolute;
  display: inline-flex;
  bottom: 9px;
  left: 50%;
  z-index: 1;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 12px);
  min-height: 28px;
  margin: 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(42, 34, 25, 0.08);
  font-size: clamp(11px, 3.45vw, 14px);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  transform: translateX(-50%);
  overflow-wrap: normal;
  white-space: nowrap;
}

.format-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background: #f0ebe3;
}

.format-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 1px dashed #d7cec2;
  background:
    linear-gradient(145deg, rgba(17, 17, 17, 0.05), rgba(255, 255, 255, 0.62)),
    #f9f6f1;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.format-card:active {
  transform: translateY(1px);
}

.other-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.86);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.other-option:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.other-option:active {
  transform: translateY(1px);
}

.telegram-badge {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
}

.telegram-icon {
  width: 17px;
  height: 17px;
  fill: var(--ink);
}

.other-copy {
  display: grid;
  gap: 4px;
  text-align: left;
}

.other-title {
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
}

.other-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1;
}

.product-shell {
  gap: 14px;
  padding-right: 16px;
  padding-left: 16px;
}

.product-back-link {
  top: max(14px, env(safe-area-inset-top));
}

.product-header-cart {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 10px;
  z-index: 3;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.product-header-cart:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.product-header-cart-icon {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.product-header-cart-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  display: inline-flex;
  min-width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid var(--bg);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.product-header-cart-badge[hidden] {
  display: none;
}

.product-cart-drawer[hidden] {
  display: none;
}

.product-cart-drawer {
  position: fixed;
  z-index: 650;
  inset: 0;
  display: grid;
  place-items: stretch center;
  background: rgba(21, 21, 21, 0.22);
  color: var(--ink);
}

.product-cart-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.product-cart-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 480px);
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  box-shadow: 0 22px 70px rgba(42, 34, 25, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}

.product-cart-drawer.is-open .product-cart-panel {
  transform: translateX(0);
}

.product-cart-panel-header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  border-bottom: 1px solid var(--line);
}

.product-cart-panel-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 680;
  line-height: 1;
}

.product-cart-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.product-cart-panel-body {
  overflow: auto;
  padding: 20px;
}

.product-cart-empty {
  display: grid;
  min-height: 240px;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.product-cart-empty[hidden],
.product-cart-line[hidden] {
  display: none;
}

.product-cart-empty p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
}

.product-cart-empty span {
  max-width: 28ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.35;
}

.product-cart-items {
  display: grid;
  gap: 18px;
}

.product-cart-items[hidden] {
  display: none;
}

.product-cart-line {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.product-cart-line:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.product-cart-line img {
  display: block;
  width: 94px;
  height: 126px;
  object-fit: cover;
  object-position: center;
  background: var(--surface);
}

.product-cart-line-copy {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 7px;
}

.product-cart-line-price {
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
}

.product-cart-line h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
}

.product-cart-line p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 470;
  line-height: 1.25;
}

.product-cart-controls {
  display: inline-grid;
  width: 124px;
  min-height: 38px;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
}

.product-cart-controls span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 620;
  line-height: 1;
  text-align: center;
}

.product-cart-quantity {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 450;
  line-height: 1;
}

.product-cart-remove {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 470;
  line-height: 1;
}

.product-cart-panel-footer {
  display: grid;
  gap: 10px;
  padding: 16px 20px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.product-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
}

.product-cart-total span,
.product-cart-total strong {
  font-size: 15px;
  font-weight: 720;
  line-height: 1;
}

.product-cart-panel-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
  line-height: 1.3;
}

.product-cart-checkout,
.product-cart-continue {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
}

.product-cart-checkout {
  background: var(--ink);
  color: #fff;
}

.product-cart-checkout:disabled {
  border-color: var(--line);
  background: #ded8cf;
  color: var(--muted);
  cursor: default;
}

.product-cart-continue {
  background: transparent;
  color: var(--ink);
}

.product-brand {
  display: flex;
  justify-content: center;
  padding: 4px 44px 0;
}

.product-brand-logo {
  width: min(58vw, 220px);
}

.product-card {
  display: grid;
  gap: 16px;
  padding-bottom: 0;
}

.product-gallery {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-gallery img,
.product-gallery-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
}

.product-gallery.is-generated img {
  object-fit: cover;
  object-position: center 44%;
}

.product-card[data-product-format="barcode"] .product-gallery.is-generated {
  aspect-ratio: 1696 / 2528;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 0;
}

.product-card[data-product-format="barcode"] .product-gallery.is-generated img {
  object-fit: contain;
  object-position: center;
}

.product-card[data-product-format="polaroid"] .product-gallery.is-generated {
  aspect-ratio: 1;
}

.product-card[data-product-format="polaroid"] .product-gallery.is-generated img {
  object-position: center 43%;
}

.product-gallery [hidden] {
  display: none;
}

.product-generation-overlay {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  z-index: 90;
  display: block;
  width: min(calc(100vw - 28px), 420px);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -130%);
  transition:
    opacity 0.22s ease,
    transform 0.24s ease;
}

.product-generation-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 10px 16px 10px 22px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);
  color: var(--ink);
  text-align: left;
}

.product-generation-overlay.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.product-generation-overlay.is-hiding {
  opacity: 0;
  transform: translate(-50%, -130%);
}

.product-generation-title {
  min-width: 0;
  padding-right: 12px;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.12;
}

.product-generation-count {
  --product-progress: 0%;
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--ink) var(--product-progress), rgba(17, 17, 17, 0.16) 0);
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
}

.product-generation-count::before {
  position: absolute;
  inset: 5px;
  z-index: -1;
  border-radius: inherit;
  background: #fff;
  content: "";
}

.product-heading {
  display: grid;
  gap: 8px;
}

.product-heading h1 {
  max-width: none;
  margin: 0;
  font-size: 23px;
  font-weight: 470;
  line-height: 1.14;
  text-align: left;
}

.product-price {
  color: var(--ink);
  font-size: 22px;
  font-weight: 760;
  line-height: 1;
}

.product-form {
  display: grid;
  gap: 10px;
}

.product-field {
  display: grid;
  gap: 7px;
}

.product-field[hidden],
.product-card[data-product-format="simple"] #productBirthYearField {
  display: none !important;
}

.product-field-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.product-input {
  min-height: 48px;
}

.product-photo-upload {
  width: 100%;
  min-height: 48px;
  margin: 0;
  border-radius: 8px;
}

.product-photo-upload.product-photo-upload {
  width: 100%;
  min-height: 48px;
  justify-self: stretch;
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
}

.product-upload-refresh {
  position: relative;
  display: none;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.product-upload-refresh::before,
.product-upload-refresh::after {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1.6px solid var(--ink);
  border-right-color: transparent;
  border-radius: 999px;
  content: "";
}

.product-upload-refresh::before {
  top: 1px;
  left: 1px;
  transform: rotate(32deg);
}

.product-upload-refresh::after {
  right: 1px;
  bottom: 1px;
  transform: rotate(212deg);
}

.product-photo-upload.is-regenerate .product-upload-refresh {
  display: none;
}

.product-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.product-card[data-product-format="polaroid"] .product-action-row {
  display: none;
}

.product-action-row .product-photo-upload.product-photo-upload,
.product-action-row .product-generate-button {
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding-right: 8px;
  padding-left: 8px;
  font-size: 10.5px;
  line-height: 1.08;
  text-wrap: balance;
}

.product-action-row .product-generate-button {
  min-height: 46px;
  margin: 1px;
}

.product-action-row .product-generate-button[hidden] {
  display: none;
}

.product-action-row .product-photo-upload.product-photo-upload {
  gap: 5px;
}

.product-photo-upload.is-disabled,
.product-polaroid-upload.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.product-action-row .compact-upload-title {
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.08;
}

.product-action-row .product-photo-upload.is-regenerate .compact-upload-title {
  white-space: pre-line;
}

.product-action-row .product-upload-refresh {
  width: 16px;
  height: 16px;
}

.product-action-row .product-upload-refresh::before,
.product-action-row .product-upload-refresh::after {
  width: 10px;
  height: 10px;
}

.product-color-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.product-color-field[hidden] {
  display: none;
}

.product-polaroid-fields {
  display: grid;
  gap: 10px;
}

.product-polaroid-upload-list {
  margin-top: 0;
}

.product-polaroid-upload {
  min-height: 48px;
  border-radius: 8px;
}

.product-polaroid-relation-field {
  margin-top: 0;
}

.product-color-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.product-color-options {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.product-color-option {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.product-color-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.product-color-option.is-selected {
  border-color: var(--ink);
  box-shadow: none;
}

.product-color-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.product-color-swatch {
  position: relative;
  overflow: hidden;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(42, 34, 25, 0.22);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.product-color-option.is-disabled .product-color-swatch::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 2px;
  border-radius: 99px;
  background: #fffaf4;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.2);
  content: "";
  transform: translate(-50%, -50%) rotate(-42deg);
}

.product-color-swatch-white {
  background: #fffaf4;
}

.product-color-swatch-black {
  background: #111111;
}

.product-size-field {
  display: grid;
  gap: 10px;
}

.product-size-header {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-size-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.product-size-guide-button {
  appearance: none;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.1;
}

.product-size-options {
  display: grid;
  gap: 6px;
}

.product-size-row {
  display: grid;
  gap: 6px;
}

.product-size-row-primary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.product-size-row-extended {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.product-size-option {
  min-width: 0;
  min-height: 32px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
}

.product-size-option.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.product-generate-button {
  width: 100%;
  margin: 0;
}

.product-cart-sticky[hidden] {
  display: none;
}

.product-cart-sticky {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  padding: 14px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(249, 246, 241, 0), var(--bg) 30%);
}

.product-cart-button {
  display: flex;
  width: 100%;
  max-width: 448px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  box-shadow: 0 14px 32px rgba(42, 34, 25, 0.18);
}

.product-status {
  display: none;
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.25;
  text-align: center;
}

.product-info-accordion {
  border-bottom: 1px solid var(--line);
}

.product-info-accordion summary {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.2;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.product-info-accordion summary::-webkit-details-marker {
  display: none;
}

.product-info-arrow {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.product-info-arrow::before,
.product-info-arrow::after {
  position: absolute;
  top: 8px;
  width: 10px;
  height: 1.5px;
  border-radius: 999px;
  background: var(--ink);
  content: "";
  transition: transform 0.2s ease;
}

.product-info-arrow::before {
  left: 1px;
  transform: rotate(45deg);
}

.product-info-arrow::after {
  right: 1px;
  transform: rotate(-45deg);
}

.product-info-accordion[open] .product-info-arrow::before {
  transform: rotate(-45deg);
}

.product-info-accordion[open] .product-info-arrow::after {
  transform: rotate(45deg);
}

.product-info-content {
  display: grid;
  gap: 8px;
  padding: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 430;
  line-height: 1.35;
}

.product-info-content p {
  margin: 0;
}

.related-formats {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.related-formats h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 470;
  line-height: 1.18;
  text-align: center;
}

.related-formats-scroller {
  display: grid;
  grid-auto-columns: 38%;
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 0 4px;
  scroll-padding-left: 0;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.related-formats-scroller::-webkit-scrollbar {
  display: none;
}

.related-format-card {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}

.related-format-image {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.related-format-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.related-format-title {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.15;
}

.related-format-price {
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.product-result {
  display: grid;
  gap: 10px;
}

.product-result[hidden] {
  display: none;
}

.product-result h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 520;
  line-height: 1.2;
  text-align: center;
}

.product-result-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checkout-shell {
  gap: 14px;
  padding-right: 16px;
  padding-left: 16px;
}

.checkout-brand {
  padding-top: 4px;
}

.checkout-page {
  display: grid;
  gap: 12px;
}

.checkout-page h1 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 620;
  line-height: 1.14;
  text-align: center;
}

.checkout-form {
  display: grid;
  gap: 12px;
}

.checkout-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(42, 34, 25, 0.045);
}

.checkout-order-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 13px;
  padding: 12px;
}

.checkout-order-card img {
  display: block;
  width: 94px;
  height: 126px;
  object-fit: cover;
  object-position: center;
  background: var(--surface);
}

.checkout-order-copy {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 7px;
}

.checkout-order-copy h2,
.checkout-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 680;
  line-height: 1.2;
}

.checkout-order-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 470;
  line-height: 1.25;
}

.checkout-order-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 3px;
  color: var(--ink);
}

.checkout-order-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1;
}

.checkout-order-price strong {
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
}

.checkout-section {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.checkout-method-block {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.checkout-summary-card {
  display: grid;
  gap: 9px;
  padding: 13px;
}

.checkout-summary-row,
.checkout-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.checkout-summary-row {
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.25;
}

.checkout-summary-row span,
.checkout-summary-total span {
  min-width: 0;
}

.checkout-summary-row strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  text-align: right;
}

.checkout-summary-total {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

.checkout-summary-total strong {
  font-size: 16px;
  font-weight: 850;
}

.checkout-status {
  min-height: 18px;
  margin: -2px 0 0;
  text-align: center;
}

.checkout-pay-button {
  width: 100%;
  margin-top: 0;
}

.checkout-pay-button.is-loading {
  opacity: 0.72;
}

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

.product-size-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 12px;
}

.product-size-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 16, 14, 0.46);
}

.product-size-dialog {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  max-height: min(82vh, 720px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 24px 70px rgba(42, 34, 25, 0.24);
}

.product-size-dialog-header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.product-size-dialog h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 620;
  line-height: 1.1;
}

.product-size-close {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  font-weight: 320;
  line-height: 1;
}

.product-size-dialog img {
  display: block;
  width: 100%;
  max-height: calc(min(82vh, 720px) - 49px);
  object-fit: contain;
  background: #fff;
}

body.modal-open {
  overflow: hidden;
}

.next-screen {
  display: flex;
  flex-direction: column;
}

.lead {
  max-width: 34ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.vintage-order-screen,
.barcode-order-screen,
.polaroid-order-screen,
.simple-order-screen,
.simple-loading-screen,
.simple-mockup-screen,
.size-screen,
.delivery-screen,
.format-placeholder-screen {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.vintage-order-screen[hidden],
.barcode-order-screen[hidden],
.polaroid-order-screen[hidden],
.simple-order-screen[hidden],
.simple-loading-screen[hidden],
.simple-mockup-screen[hidden],
.size-screen[hidden],
.delivery-screen[hidden],
.format-placeholder-screen[hidden] {
  display: none;
}

.payment-status-screen {
  min-height: 100vh;
  padding: 18px;
}

.payment-status-logo {
  margin: 0 auto;
}

.payment-success-card {
  display: grid;
  gap: 16px;
  width: 100%;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(42, 34, 25, 0.055);
}

.payment-success-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 760;
  line-height: 1;
}

.payment-success-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 680;
  line-height: 1.1;
}

.payment-success-lead,
.payment-success-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 450;
  line-height: 1.42;
}

.payment-success-note {
  display: grid;
  gap: 6px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.payment-success-note-title,
.payment-messenger-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
}

.payment-messenger-block {
  display: grid;
  gap: 10px;
}

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

.payment-messenger-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}

.payment-messenger-link.is-muted {
  border-color: rgba(17, 17, 17, 0.22);
  color: rgba(17, 17, 17, 0.42);
}

.payment-messenger-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1.4px solid currentColor;
  border-radius: 999px;
}

.payment-messenger-icon svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.max-messenger-icon {
  font-size: 8px;
  font-weight: 860;
  text-transform: uppercase;
}

.payment-home-link {
  justify-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.payment-status-button {
  margin-top: 24px;
}

.size-screen {
  gap: 10px;
}

.size-guide-image-frame,
.size-table-wrap,
.size-advice {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.size-guide-image-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
}

.size-metrics-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.size-metric {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.metric-a {
  border-color: rgba(217, 40, 40, 0.34);
  color: #bd1f1f;
}

.metric-b {
  border-color: rgba(65, 154, 57, 0.34);
  color: #317f2e;
}

.metric-c {
  border-color: rgba(202, 174, 0, 0.42);
  color: #8f7d00;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.size-table th,
.size-table td {
  padding: 8px 5px;
  border-bottom: 1px solid var(--line);
}

.size-table th {
  background: #ece6dd;
  font-size: 11px;
  font-weight: 850;
}

.size-table tbody tr:nth-child(even) {
  background: rgba(240, 235, 227, 0.52);
}

.size-table tbody tr:last-child td {
  border-bottom: 0;
}

.size-table td:first-child {
  font-weight: 850;
}

.size-advice {
  padding: 12px 13px;
}

.size-advice h2 {
  margin: 0 0 7px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
}

.size-advice p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 520;
  line-height: 1.35;
  text-align: center;
}

.size-advice p + p {
  margin-top: 8px;
}

.advice-a {
  color: #bd1f1f;
  font-weight: 850;
}

.advice-b {
  color: #317f2e;
  font-weight: 850;
}

.size-deviation {
  color: var(--muted);
}

.size-choice-form {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.size-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.size-submit-button {
  width: 100%;
  margin-top: 0;
}

.delivery-form {
  display: grid;
  gap: 10px;
}

.delivery-method-block {
  display: grid;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(42, 34, 25, 0.045);
}

.delivery-method-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.delivery-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.delivery-method-card {
  display: grid;
  min-height: 48px;
  gap: 4px;
  align-content: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.72);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.delivery-method-card.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.delivery-method-card:active {
  transform: translateY(1px);
}

.delivery-method-name {
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.delivery-method-time {
  color: inherit;
  font-size: 12px;
  font-weight: 560;
  line-height: 1;
}

.delivery-method-fields {
  display: grid;
  gap: 10px;
}

.delivery-method-fields[hidden] {
  display: none;
}

.delivery-fixed-value {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.delivery-price-card {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(42, 34, 25, 0.045);
}

.delivery-price-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.delivery-price-value {
  color: var(--muted);
  font-size: 14px;
  font-weight: 520;
  line-height: 1.3;
}

.order-summary-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(42, 34, 25, 0.045);
}

.order-summary-card[hidden] {
  display: none;
}

.order-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.25;
}

.order-summary-row span {
  min-width: 0;
}

.order-summary-row strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.order-summary-total {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.order-summary-total strong {
  font-size: 15px;
}

.delivery-continue-button {
  width: 100%;
  margin-top: 0;
  padding: 10px 12px;
  line-height: 1.18;
  text-align: center;
  white-space: normal;
}

.selected-pickup-card[hidden],
.courier-delivery-card[hidden] {
  display: none;
}

.selected-pickup-delivery {
  color: var(--ink);
  font-weight: 760;
}

.delivery-suggestion-list,
.pickup-point-list {
  display: grid;
  overflow: hidden;
  margin-top: -4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(42, 34, 25, 0.08);
}

.delivery-suggestion-list[hidden],
.pickup-point-list[hidden] {
  display: none;
}

.delivery-suggestion-item,
.pickup-point-item {
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.delivery-suggestion-item:last-child,
.pickup-point-item:last-child {
  border-bottom: 0;
}

.delivery-suggestion-item:active,
.pickup-point-item:active {
  background: rgba(21, 21, 21, 0.04);
}

.delivery-suggestion-title,
.pickup-point-address {
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
}

.pickup-point-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
  line-height: 1.25;
}

.vintage-example {
  position: relative;
  overflow: hidden;
  width: min(100%, 330px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.vintage-example img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
}

.example-marker {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 8px 18px rgba(42, 34, 25, 0.12);
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.marker-patronymic {
  top: 6.8%;
  left: 4.8%;
}

.marker-year {
  right: 5.2%;
  bottom: 14%;
}

.barcode-example img {
  object-position: center 50%;
}

.barcode-marker-patronymic {
  top: 7%;
  left: 9%;
}

.barcode-marker-name {
  bottom: 10.5%;
  left: 9%;
}

.barcode-marker-phrase {
  right: 8.3%;
  bottom: 10.5%;
}

.barcode-marker-date {
  bottom: 0;
  left: 41%;
}

.polaroid-example img {
  object-position: center 45%;
}

.polaroid-marker-one {
  top: 35%;
  left: 14%;
}

.polaroid-marker-two {
  top: 24%;
  left: 55%;
}

.simple-example img {
  object-position: center;
}

.compact-photo-upload {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 10px auto 0;
  padding: 6px 11px 6px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(42, 34, 25, 0.06);
  cursor: pointer;
  color: var(--ink);
}

.compact-photo-upload.is-filled {
  border-color: rgba(17, 17, 17, 0.34);
}

.photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.compact-upload-icon {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
}

.compact-photo-upload.is-filled .compact-upload-icon {
  display: none;
}

.compact-upload-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.compact-plus {
  position: absolute;
  inset: 0;
  display: block;
}

.compact-plus::before,
.compact-plus::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 13px;
  height: 2px;
  border-radius: 99px;
  background: var(--ink);
  content: "";
  transform: translate(-50%, -50%);
}

.compact-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.vintage-fields {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.barcode-fields {
  margin-top: 12px;
}

.barcode-photo-upload {
  margin-top: 10px;
}

.polaroid-upload-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  justify-items: stretch;
}

.polaroid-photo-upload {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding-right: 9px;
}

.polaroid-photo-upload .compact-upload-title {
  min-width: 0;
  white-space: normal;
}

.polaroid-relation-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
}

.polaroid-relation-option {
  display: inline-flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(42, 34, 25, 0.045);
  cursor: pointer;
  color: var(--ink);
}

.polaroid-relation-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.polaroid-relation-dot {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
}

.polaroid-relation-dot::after {
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: var(--ink);
  content: "";
  opacity: 0;
}

.polaroid-relation-input:checked + .polaroid-relation-dot::after {
  opacity: 1;
}

.polaroid-relation-text {
  min-width: 0;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.polaroid-development-message {
  max-width: 280px;
  margin: 16px auto 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 520;
  line-height: 1.3;
  text-align: center;
}

.polaroid-development-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.polaroid-back-choice {
  min-height: 48px;
  margin-top: 0;
}

.polaroid-manager-link {
  margin-top: 0;
}

.telegram-redirect-screen {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  text-align: center;
}

.telegram-redirect-screen[hidden] {
  display: none;
}

.telegram-redirect-text {
  max-width: 280px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 520;
  line-height: 1.35;
}

.telegram-open-button {
  text-decoration: none;
}

.simple-fields {
  margin-top: 14px;
}

.simple-photo-upload {
  margin-top: 10px;
}

.text-field {
  display: grid;
  gap: 7px;
}

.field-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.25;
}

.field-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(42, 34, 25, 0.045);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 520;
  letter-spacing: 0;
  outline: none;
}

.field-input:disabled {
  opacity: 0.62;
}

.field-input:focus {
  border-color: rgba(17, 17, 17, 0.46);
}

.field-input.is-invalid {
  border-color: rgba(160, 28, 28, 0.58);
}

.field-input.is-valid {
  border-color: rgba(29, 111, 67, 0.42);
}

.field-input::placeholder {
  color: rgba(17, 17, 17, 0.38);
  opacity: 1;
}

.field-hint.is-error {
  color: #9f1f1f;
}

.field-hint.is-success {
  color: #276b45;
}

.field-input:focus::placeholder {
  color: transparent;
  opacity: 0;
}

.create-layout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  border: 1px solid #d8d0c5;
  border-radius: 8px;
  background: #e4ded5;
  color: #a19a91;
  cursor: default;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.create-layout-button.is-ready {
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 12px 26px rgba(42, 34, 25, 0.16);
  color: var(--surface);
  cursor: pointer;
}

.create-layout-button.is-ready:active {
  transform: translateY(1px);
}

.create-layout-button[hidden] {
  display: none;
}

.next-screen:has(#simpleVintageScreen:not([hidden])) .create-layout-button,
.next-screen:has(#barcodeScreen:not([hidden])) .create-layout-button,
.next-screen:has(#polaroidScreen:not([hidden])) .create-layout-button,
.next-screen:has(#simpleScreen:not([hidden])) .create-layout-button {
  margin-top: 10px;
}

.print-preview-frame {
  display: grid;
  width: min(100%, 310px);
  margin: 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.print-preview-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
  background: #ffffff;
}

.shirt-preview-stage {
  position: relative;
  overflow: hidden;
  width: min(100%, 330px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shirt-preview-stage canvas {
  display: block;
  width: 100%;
  height: auto;
}

.mockup-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mockup-actions .create-layout-button,
.mockup-actions .back-link,
.mockup-actions .other-option {
  min-height: 44px;
  margin-top: 0;
}

.mockup-download-link {
  margin-top: 0;
}

.mockup-edit-button {
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.mockup-manager-link {
  margin-top: 0;
}

.processing-screen {
  justify-content: flex-start;
}

.processing-content {
  display: flex;
  flex: 1;
  min-height: 420px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 26px;
  text-align: center;
}

.processing-spinner {
  position: relative;
  width: 92px;
  height: 92px;
  border: 1.5px solid rgba(17, 17, 17, 0.2);
  border-top-color: var(--ink);
  border-right-color: var(--ink);
  border-radius: 999px;
  animation: processing-spin 1100ms linear infinite;
}

.spinner-arrow {
  position: absolute;
  display: block;
  width: 13px;
  height: 13px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}

.spinner-arrow-one {
  top: 7px;
  right: 13px;
  transform: rotate(24deg);
}

.spinner-arrow-two {
  bottom: 7px;
  left: 13px;
  transform: rotate(204deg);
}

.processing-title {
  max-width: 15ch;
  font-size: clamp(24px, 6vw, 31px);
}

@keyframes processing-spin {
  to {
    transform: rotate(360deg);
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 10px;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 360px) {
  .quiz-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .format-list {
    gap: 9px;
  }

  .format-card {
    padding: 6px;
  }

  .format-image h2 {
    font-size: 14px;
  }
}

@media (min-width: 720px) {
  .quiz-shell {
    padding-top: 26px;
  }
}

.yookassa-payment-screen .checkout-page {
  padding-bottom: 28px;
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.yookassa-payment-screen {
  gap: 10px;
}

.yookassa-payment-screen .checkout-brand {
  padding-top: 0;
}

.yookassa-payment-page {
  gap: 8px;
}

.yookassa-payment-note {
  color: #5f5a53;
  font-size: 12px;
  line-height: 1.35;
  margin: 0 auto 10px;
  max-width: 30ch;
  text-align: center;
}

.yookassa-widget-card {
  min-height: 420px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.yookassa-widget-status {
  display: block;
  margin: 8px 0 12px;
  text-align: center;
}

.yookassa-widget-status:empty {
  display: none;
}

.yookassa-widget-status.is-error {
  color: #9f1d1d;
}

#yookassaPaymentForm {
  width: 100%;
  min-width: 0;
}

#yookassaPaymentForm iframe {
  max-width: 100%;
}
