/* Yawn Studio: photo, yawn slider, product. Builds on experience.css. */
.ys-main {
  max-width: 1280px;
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: 72px;
}

.ys-intro {
  margin-bottom: clamp(26px, 4vw, 48px);
}

.ys-intro h1 {
  font-size: clamp(50px, 9vw, 114px);
}

.ys-intro .lede {
  max-width: 720px;
}

.ys-workbench {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}

.ys-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: clamp(18px, 2.6vw, 32px);
  min-width: 0;
}

.ys-step h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(26px, 2.6vw, 36px);
  letter-spacing: -0.04em;
}

.ys-number {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-size: 0.6em;
  letter-spacing: 0;
}

.ys-step p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.55;
}

.ys-card .fine {
  color: #566056;
  font-size: 12.5px;
}

.ys-status {
  min-height: 1.4em;
  font-weight: 700;
  font-size: 14px;
}

.ys-status:empty,
.ys-card .fine:empty {
  display: none;
}

.ys-error {
  color: #8d2a1e;
}

.ys-sketch-pay {
  border-block: 1px solid #adb39d;
  padding: .75rem 0;
  margin: 1rem 0;
}

.ys-sketch-pay p {
  margin: 0 0 .5rem;
}

.ys-sketch-pay p:last-child {
  margin-bottom: 0;
}

/* Step 1 */
.ys-drop {
  display: grid;
  place-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  min-height: 190px;
  border: 2px dashed #8d977f;
  border-radius: 4px;
  background: #e7e5da;
  cursor: pointer;
  text-align: center;
}

.ys-drop img {
  max-height: 300px;
  width: auto;
  border-radius: 2px;
}

.ys-drop-label {
  background: var(--ink);
  color: var(--paper);
  padding: 11px 18px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 14px;
}

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

.ys-file:focus-visible + p,
.ys-drop:has(+ .ys-file:focus-visible) {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.ys-choices {
  border: 0;
  margin: 16px 0 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ys-choices legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #485247;
}

.ys-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ys-choices label {
  position: relative;
  cursor: pointer;
}

.ys-choices input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: inherit;
}

.ys-choices label span {
  display: block;
  padding: 9px 14px;
  border: 1px solid #7d8774;
  border-radius: 30px;
  font-size: 14px;
  line-height: 1.2;
  background: transparent;
}

.ys-choices input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.ys-choices input:focus-visible + span {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.ys-choices input:disabled + span {
  color: #7b8479;
  border-style: dashed;
  cursor: default;
}

.ys-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}

.ys-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--ink);
}

.ys-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 16px;
}

.ys-actions .ys-choices {
  margin-top: 0;
}

.ys-actions .ys-choices legend {
  float: left;
  margin: 0 8px 0 0;
  line-height: 38px;
}

.ys-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.ys-primary:disabled {
  background: #dfe3d6;
  border-color: #a3ada2;
  color: #5b655b;
  cursor: default;
}

.ys-quiet,
.ys-link {
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.ys-quiet:disabled {
  color: #7b8479;
  cursor: default;
}

.ys-link {
  display: inline-block;
}

.ys-card button:focus-visible,
.ys-card a:focus-visible {
  outline-offset: 3px;
}

/* Step 2 */
.ys-viewer {
  display: grid;
  place-items: center;
  margin-top: 16px;
  min-height: 300px;
  padding: clamp(10px, 2vw, 22px);
  border-radius: 4px;
  background: #fbf8ef;
  box-shadow: inset 0 0 0 1px #d6d2c2;
  transition: background 0.2s;
}

.ys-viewer[data-backdrop=black] {
  background: #121412;
  box-shadow: none;
  color: var(--paper);
}

.ys-viewer canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(62vh, 620px);
}

.ys-viewer p {
  margin: 0;
  max-width: 300px;
  text-align: center;
  color: #6b746a;
}

.ys-slider {
  margin-top: 18px;
}

.ys-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-weight: 700;
}

.ys-slider-head label {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #485247;
}

.ys-slider-head output {
  font: 22px/1.1 Archivo, sans-serif;
  letter-spacing: -0.03em;
}

.ys-ticks {
  --ys-count: 6;
  display: grid;
  grid-template-columns: repeat(var(--ys-count), minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.ys-ticks:empty {
  display: none;
}

.ys-tick {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 2px 8px;
  border: 1px solid #c6c9b9;
  border-radius: 4px;
  background: #fbf8ef;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  min-width: 0;
}

.ys-tick canvas {
  width: 100%;
  max-width: 72px;
  aspect-ratio: 1;
  border-radius: 2px;
}

.ys-tick strong {
  font-size: 13px;
}

.ys-tick span {
  color: #5b655b;
}

.ys-tick[aria-pressed=true] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.ys-tick[aria-pressed=true] span {
  color: var(--lime);
}

.ys-tick[aria-pressed=true] canvas {
  background: #fbf8ef;
}

.ys-tick[data-status=waiting],
.ys-tick[data-status=drawing] {
  border-style: dashed;
  cursor: default;
}

.ys-tick[data-status=drawing] canvas {
  background: linear-gradient(100deg, #e7e5da 30%, #fbf8ef 50%, #e7e5da 70%);
  background-size: 200% 100%;
  animation: ys-easel 1.4s linear infinite;
}

.ys-tick[data-status=failed] {
  border-color: #b4523f;
}

.ys-tick[data-status=failed] span {
  color: #8d2a1e;
  font-weight: 700;
}

@keyframes ys-easel {
  to { background-position: -200% 0; }
}

.ys-slider input[type=range] {
  display: block;
  /* Line the track's ends up with the centres of the first and last drawing. */
  width: calc(100% - 100% / var(--ys-ready, 6) + 28px);
  margin: 14px auto 0;
  height: 28px;
  accent-color: var(--coral);
  cursor: grab;
}

.ys-slider input[type=range]:disabled {
  cursor: default;
  opacity: 0.45;
}

/* Step 3 */
.ys-merch {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(18px, 3vw, 36px);
  margin-top: 20px;
  align-items: start;
}

.ys-mockup {
  margin: 0;
  background: #d4d5cd;
  border-radius: 4px;
  padding: clamp(10px, 2vw, 24px);
}

.ys-mockup canvas {
  display: block;
  width: 100%;
  height: auto;
}

.ys-mockup figcaption {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.ys-lock {
  margin-top: 20px;
}

.ys-locked {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #c6c9b9;
  border-radius: 4px;
  background: #fbf8ef;
}

.ys-locked img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 2px;
  background: #fbf8ef;
  box-shadow: inset 0 0 0 1px #d6d2c2;
}

.ys-locked[data-ink=light] img {
  background: #141614;
}

.ys-proof-images figure {
  margin: .6rem 0 0;
}

.ys-proof-images figcaption {
  color: #566056;
  font-size: 12px;
}

.ys-locked #ys-download-sleeve {
  display: block;
  width: fit-content;
  margin-top: .4rem;
}

.ys-sleeve-detail {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .5rem 0 0;
  font-size: 13px;
}

.ys-sleeve-detail canvas {
  width: 96px;
  height: 96px;
  border: 1px solid #b0b4a4;
  border-radius: 4px;
  background: #fffdf5;
}

.ys-sleeve-detail[data-ink=light] canvas {
  background: #171915;
}

.ys-locked strong,
.ys-locked small {
  display: block;
}

.ys-locked small {
  color: #566056;
  margin-top: 2px;
}

.ys-order {
  display: block;
  width: fit-content;
  margin-top: 8px;
  background: var(--coral);
  border-color: var(--coral);
  color: var(--ink);
}

.ys-checkout {
  margin-block: 14px 10px;
}

.ys-checkout > label:first-child {
  display: block;
  font-weight: 700;
}

.ys-checkout select {
  width: 100%;
  margin-block: 6px 10px;
  padding: 8px;
  border: 1px solid #8b9484;
  border-radius: 4px;
  background: #fffdf7;
  color: var(--ink);
  font: inherit;
}

.ys-checkout [type=checkbox] {
  flex-shrink: 0;
}

.ys-locked .fine {
  margin-top: 10px;
}

/* Notes and footer */
.ys-notes {
  margin-top: 36px;
  max-width: 820px;
}

.ys-notes h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.ys-notes ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #ced7c7;
  font-size: 15px;
}

.ys-notes li + li {
  margin-top: 8px;
}

.ys-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 900px) {
  .ys-workbench,
  .ys-merch {
    grid-template-columns: minmax(0, 1fr);
  }

  .ys-merch .ys-mockup {
    grid-row: 1;
  }
}

@media (max-width: 520px) {
  .ys-ticks {
    gap: 4px;
  }

  .ys-tick {
    font-size: 10.5px;
    padding: 4px 1px 6px;
  }

  .ys-tick strong {
    font-size: 11px;
  }

  .ys-locked {
    grid-template-columns: minmax(0, 1fr);
  }

  .ys-slider-head output {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ys-tick[data-status=drawing] canvas {
    animation: none;
  }
}
