:root {
  --draw-color-yellow: #fff64f;
  --draw-color-red: #ff4f4f;
  --draw-color-blue: #4f95ff;
  --draw-surface-blue: #67d1f9;
  --draw-tool-clear: #ff7467;
  --draw-slider-thumb: #3573ca;
  --draw-slider-track: #d9d9d9;
  --draw-toolbar-width: 220px;
}

.draw-play-main {
  overflow: hidden;
}

body.draw-toolbar-open {
  overflow: hidden;
}

.draw-play-section {
  padding: 0 0 156px;
}

.draw-play-heading {
  gap: 24px;
  margin-bottom: 52px;
}

.draw-play-heading__actions {
  gap: 16px;
}

.draw-play-title {
  margin: 0;
  color: var(--black-main);
}

.draw-play-tools-toggle {
  position: relative;
  width: 45px;
  height: 45px;
  padding: 0;
  border: 1px solid var(--color-blue);
  border-radius: 50%;
  background: var(--fill-color-2-white);
  color: var(--color-blue);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.draw-play-tools-toggle span {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.draw-play-tools-toggle span:nth-child(1) {
  top: 15px;
}

.draw-play-tools-toggle span:nth-child(2) {
  top: 21px;
}

.draw-play-tools-toggle span:nth-child(3) {
  top: 27px;
}

.draw-play-tools-toggle:hover,
.draw-play-tools-toggle:focus-visible,
.draw-play-tools-toggle[aria-expanded="true"] {
  background: var(--color-blue);
  color: var(--fill-color-2-white);
  transform: translateY(-2px);
}

.draw-play-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 163px;
  min-height: 45px;
  padding: 14px 40px;
  border: 1px solid var(--color-blue);
  border-radius: 80px;
  background: var(--color-blue);
  color: var(--fill-color-2-white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.draw-play-download:hover,
.draw-play-download:focus-visible {
  background: var(--fill-color-2-white);
  color: var(--color-blue);
  transform: translateY(-2px);
}

.draw-play-layout {
  --bs-gutter-x: 35px;
  --bs-gutter-y: 36px;
  margin-left: calc(-1 * var(--bs-gutter-x));
  margin-right: calc(-1 * var(--bs-gutter-x));
}

.draw-play-layout>[class^="col-"],
.draw-play-layout>[class*="col-"] {
  padding-left: var(--bs-gutter-x);
  padding-right: var(--bs-gutter-x);
}

.draw-toolbar-column {
  flex: 0 0 auto;
}

.draw-toolbar {
  width: min(100%, var(--draw-toolbar-width));
}

.draw-toolbar__panel-header {
  display: none;
}

.draw-toolbar__panel-title {
  color: var(--black-main);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.draw-toolbar__close {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(2, 2, 2, 0.08);
  border-radius: 50%;
  background: var(--fill-color-2-white);
}

.draw-toolbar__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--black-main);
}

.draw-toolbar__close span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.draw-toolbar__close span:nth-child(2) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.draw-toolbar__group + .draw-toolbar__group {
  margin-top: 34px;
}

.draw-toolbar__title {
  margin: 0 0 16px;
  color: var(--color-text);
  font-size: var(--text-size-4);
  font-weight: 400;
  line-height: 1.4;
}

.draw-toolbar__swatches {
  gap: 14px;
}

.draw-swatch {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--draw-swatch-color);
  box-shadow: inset 0 0 0 1px rgba(2, 2, 2, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.draw-swatch:hover,
.draw-swatch:focus-visible {
  transform: translateY(-2px);
}

.draw-swatch.is-active {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 0 5px rgba(2, 2, 2, 0.08);
}

.draw-swatch__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--fill-color-2-white);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.draw-swatch.is-active .draw-swatch__check {
  opacity: 1;
  transform: scale(1);
}

.draw-color-picker {
  position: relative;
  display: inline-flex;
  flex: 0 0 52px;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.draw-color-picker__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.draw-color-picker__button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.draw-color-picker__button img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.draw-color-picker:hover .draw-color-picker__button,
.draw-color-picker:focus-within .draw-color-picker__button {
  transform: translateY(-2px);
}

.draw-color-picker.is-active .draw-color-picker__button {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 0 5px rgba(2, 2, 2, 0.08);
}

.draw-color-picker__caption {
  color: var(--fill-color-6-descriptor);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.draw-toolbar__tools {
  gap: 17px;
}

.draw-tool-button {
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--draw-slider-track);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.draw-tool-button img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.draw-tool-button--accent {
  background: var(--draw-tool-clear);
}

.draw-tool-button.is-active {
  box-shadow: 0 0 0 4px rgba(53, 115, 202, 0.18);
}

.draw-tool-button:hover,
.draw-tool-button:focus-visible {
  transform: translateY(-2px);
}

.draw-size-control {
  display: block;
  max-width: 159px;
}

.draw-size-control__range {
  --draw-range-progress: 11%;
  width: 100%;
  height: 17px;
  padding: 0;
  border: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.draw-size-control__range:focus {
  outline: none;
}

.draw-size-control__range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 60px;
  background: linear-gradient(
    to right,
    var(--draw-slider-thumb) 0,
    var(--draw-slider-thumb) var(--draw-range-progress),
    var(--draw-slider-track) var(--draw-range-progress),
    var(--draw-slider-track) 100%
  );
}

.draw-size-control__range::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 50%;
  background: var(--draw-slider-thumb);
  -webkit-appearance: none;
  appearance: none;
}

.draw-size-control__range::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 60px;
  background: var(--draw-slider-track);
}

.draw-size-control__range::-moz-range-progress {
  height: 8px;
  border-radius: 60px;
  background: var(--draw-slider-thumb);
}

.draw-size-control__range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 50%;
  background: var(--draw-slider-thumb);
}

.draw-surface-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.draw-surface {
  --draw-surface-color: var(--draw-surface-blue);
  position: relative;
  width: 100%;
  aspect-ratio: 1337.564 / 696.011;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--radius-footer-panel);
  background: var(--draw-surface-color);
}

.draw-surface__canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.draw-surface.is-erasing .draw-surface__canvas {
  cursor: cell;
}

.draw-toolbar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(2, 2, 2, 0.38);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.draw-toolbar-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1439px) {
  .draw-play-layout {
    --bs-gutter-x: 42px;
  }
}

@media (max-width: 1199px) {
  .draw-play-section {
    padding-bottom: 124px;
  }

  .draw-play-heading {
    margin-bottom: 40px;
  }

  .draw-toolbar-column {
    position: relative;
    flex: 0 0 0;
    width: 0;
    max-width: 0;
    padding: 0;
    margin: 0;
    overflow: visible;
  }

  .draw-surface-column {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }

  .draw-toolbar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 30;
    width: min(360px, calc(100vw - 24px));
    height: 100dvh;
    overflow-y: auto;
    padding: 22px 20px 28px;
    border-radius: 32px 0 0 32px;
    background: var(--fill-color-2-white);
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .draw-toolbar.is-open {
    transform: translateX(0);
  }

  .draw-toolbar__panel-header {
    display: flex;
    margin-bottom: 18px;
  }

  .draw-toolbar__group + .draw-toolbar__group {
    margin-top: 28px;
  }

  .draw-toolbar__swatches,
  .draw-toolbar__tools {
    gap: 12px;
  }

  .draw-surface {
    min-height: 0;
  }
}

@media (max-width: 767px) {
  .draw-play-section {
    padding-bottom: 96px;
  }

  .draw-play-heading {
    gap: 18px;
    margin-bottom: 32px;
  }

  .draw-play-heading__actions {
    width: calc(100% - 12px);
    gap: 12px;
  }

  .draw-play-tools-toggle {
    flex: 0 0 45px;
  }

  .draw-play-download {
    flex: 1 1 auto;
    min-width: 0;
  }

  .draw-play-layout {
    --bs-gutter-x: 0;
    --bs-gutter-y: 24px;
  }

  .draw-toolbar__title {
    margin-bottom: 14px;
    font-size: 18px;
  }

  .draw-toolbar__group + .draw-toolbar__group {
    margin-top: 24px;
  }

  .draw-color-picker {
    flex-basis: 48px;
  }

  .draw-surface-column {
    padding-left: 12px;
    padding-right: 12px;
  }

  .draw-surface-card {
    max-width: 100%;
  }

  .draw-surface {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1337.564 / 696.011;
    border-radius: 34px;
  }
}
