.theme-preset-item,
.theme-custom-item {
  width: var(--theme-preview-size);
  height: var(--theme-preview-size);
  position: relative;
}

.theme-preset-button,
.theme-custom-button {
  padding: 0;
  border-radius: var(--theme-radius);
  width: 100%;
  height: 100%;
  line-height: 1.6;
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  z-index: 2;
  transition: height var(--layout-timing-extra-fast), box-shadow var(--layout-timing-extra-fast), border-radius var(--layout-timing-extra-fast);
}

.theme-custom-control {
  border-radius: 0 0 var(--theme-radius) var(--theme-radius);
  width: 100%;
  height: 0;
  position: absolute;
  bottom: 0;
  overflow: hidden;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  z-index: 1;
  transition: height var(--layout-timing-extra-fast);
}

.theme-custom-control-item {
  padding: 0;
  border-radius: 0;
  flex: 1 1 auto;
}

.is-theme-custom-edit .theme-custom-button {
  border-radius: var(--theme-radius) var(--theme-radius) 0 0;
  height: calc(100% - var(--theme-custom-edit-height));
  box-shadow: var(--theme-shadow-bottom-medium);
}

.is-theme-custom-edit .theme-custom-button:hover {
  box-shadow: var(--form-ring-hover);
}

.is-theme-custom-edit .theme-custom-button:focus,
.is-theme-custom-edit .theme-custom-button:active {
  box-shadow: var(--form-ring-accent);
}

.is-theme-custom-edit .theme-custom-control {
  height: var(--theme-custom-edit-height);
}

.theme-preset-preview,
.theme-custom-preview {
  border-radius: var(--theme-radius);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  transition: border-radius var(--layout-timing-extra-fast);
}

.is-theme-custom-edit .theme-custom-preview {
  border-radius: var(--theme-radius) var(--theme-radius) 0 0;
}

.theme-preset-background-01,
.theme-preset-background-02,
.theme-preset-background-03,
.theme-preset-background-04,
.theme-preset-accent,
.theme-custom-background-01,
.theme-custom-background-02,
.theme-custom-background-03,
.theme-custom-background-04,
.theme-custom-accent {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  transition: clip-path var(--layout-timing-extra-fast);
}

.theme-preset-background-01,
.theme-custom-background-01 {
  z-index: 1;
}

.theme-preset-background-01 {
  background-color: rgb(var(--theme-preset-background-01));
}

.theme-custom-background-01 {
  background-color: rgb(var(--theme-custom-background-01));
}

.theme-preset-background-02,
.theme-custom-background-02 {
  z-index: 2;
  clip-path: polygon(70% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 70%);
  transition-delay: var(--layout-duration-03);
}

.theme-preset-background-02 {
  background-color: rgb(var(--theme-preset-background-02));
}

.theme-custom-background-02 {
  background-color: rgb(var(--theme-custom-background-02));
}

.theme-preset-background-03,
.theme-custom-background-03 {
  z-index: 3;
  clip-path: polygon(100% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 100%);
  transition-delay: var(--layout-duration-02);
}

.theme-preset-background-03 {
  background-color: rgb(var(--theme-preset-background-03));
}

.theme-custom-background-03 {
  background-color: rgb(var(--theme-custom-background-03));
}

.theme-preset-background-04,
.theme-custom-background-04 {
  z-index: 4;
  clip-path: polygon(100% 30%, 100% 100%, 30% 100%);
  transition-delay: var(--layout-duration-01);
}

.theme-preset-background-04 {
  background-color: rgb(var(--theme-preset-background-04));
}

.theme-custom-background-04 {
  background-color: rgb(var(--theme-custom-background-04));
}

.theme-preset-accent,
.theme-custom-accent {
  z-index: 5;
  clip-path: circle(30% at 100% 100%);
}

.theme-preset-accent {
  background-color: rgb(var(--theme-preset-accent));
}

.theme-custom-accent {
  background-color: rgb(var(--theme-custom-accent));
}

.is-theme-custom-edit .theme-custom-accent {
  clip-path: circle(30% at 100% 60%);
}

.theme-preset-name,
.theme-custom-name {
  color: rgb(var(--theme-style-text));
  font-style: normal;
  font-size: 0.8em;
  text-align: left;
  display: block;
  max-width: calc(100% - 2em);
  max-height: calc(100% - 2em);
  position: absolute;
  top: 1em;
  left: 1em;
  z-index: 6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: initial;
  transform: scale(1);
  transition: transform var(--layout-timing-extra-fast);
}

.theme-preset-button:focus .theme-preset-background-02,
.theme-preset-button:hover .theme-preset-background-02,
.theme-custom-button:focus .theme-custom-background-02,
.theme-custom-button:hover .theme-custom-background-02 {
  clip-path: polygon(60% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 60%);
}

.theme-preset-button:focus .theme-preset-background-03,
.theme-preset-button:hover .theme-preset-background-03,
.theme-custom-button:focus .theme-custom-background-03,
.theme-custom-button:hover .theme-custom-background-03 {
  clip-path: polygon(90% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 90%);
}

.theme-preset-button:focus .theme-preset-background-04,
.theme-preset-button:hover .theme-preset-background-04,
.theme-custom-button:focus .theme-custom-background-04,
.theme-custom-button:hover .theme-custom-background-04 {
  clip-path: polygon(100% 20%, 100% 100%, 20% 100%);
}

.theme-preset-button:focus .theme-preset-accent,
.theme-preset-button:hover .theme-preset-accent,
.theme-custom-button:focus .theme-custom-accent,
.theme-custom-button:hover .theme-custom-accent {
  clip-path: circle(40% at 100% 100%);
}

.is-theme-custom-edit .theme-custom-button:focus .theme-custom-accent,
.is-theme-custom-edit .theme-custom-button:hover .theme-custom-accent {
  clip-path: circle(40% at 100% 60%);
}

.theme-color-box {
  width: 100%;
  height: 100%;
}

.theme-color-negative-10 {
  background-color: rgb(var(--theme-color-01));
}

.theme-color-negative-09 {
  background-color: rgb(var(--theme-color-02));
}

.theme-color-negative-08 {
  background-color: rgb(var(--theme-color-03));
}

.theme-color-negative-07 {
  background-color: rgb(var(--theme-color-04));
}

.theme-color-negative-06 {
  background-color: rgb(var(--theme-color-05));
}

.theme-color-negative-05 {
  background-color: rgb(var(--theme-color-06));
}

.theme-color-negative-04 {
  background-color: rgb(var(--theme-color-07));
}

.theme-color-negative-03 {
  background-color: rgb(var(--theme-color-08));
}

.theme-color-negative-02 {
  background-color: rgb(var(--theme-color-09));
}

.theme-color-negative-01 {
  background-color: rgb(var(--theme-color-10));
}

.theme-color {
  background-color: rgb(var(--theme-color));
}

.theme-color-positive-01 {
  background-color: rgb(var(--theme-color-11));
}

.theme-color-positive-02 {
  background-color: rgb(var(--theme-color-12));
}

.theme-color-positive-03 {
  background-color: rgb(var(--theme-color-13));
}

.theme-color-positive-04 {
  background-color: rgb(var(--theme-color-14));
}

.theme-color-positive-05 {
  background-color: rgb(var(--theme-color-15));
}

.theme-color-positive-06 {
  background-color: rgb(var(--theme-color-16));
}

.theme-color-positive-07 {
  background-color: rgb(var(--theme-color-17));
}

.theme-color-positive-08 {
  background-color: rgb(var(--theme-color-18));
}

.theme-color-positive-09 {
  background-color: rgb(var(--theme-color-19));
}

.theme-color-positive-10 {
  background-color: rgb(var(--theme-color-20));
}

.theme-accent-preset-grid {
  display: grid;
  grid-gap: var(--form-wrap-space);
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(5, 1fr);
  justify-items: center;
}

.theme-accent-preset-item {
  background-color: hsl(var(--theme-accent-preset-item-color-h), calc(var(--theme-accent-preset-item-color-s) * 1%), calc(var(--theme-accent-preset-item-color-l) * 1%));
  padding: 0;
  width: 1.5em;
  height: 1.5em;
  min-width: 1.5em;
  min-height: 1.5em;
}

.theme-accent-preset-item:focus,
.theme-accent-preset-item:hover,
.theme-accent-preset-item:active {
  background-color: hsl(var(--theme-accent-preset-item-color-h), calc(var(--theme-accent-preset-item-color-s) * 1%), calc(var(--theme-accent-preset-item-color-l) * 1%));
}

@media (min-width: 700px) {
  .theme-accent-preset-item {
    width: 2em;
    height: 2em;
    min-width: 2em;
    min-height: 2em;
  }
}

@media (min-width: 900px) {
  .theme-accent-preset-item {
    width: 2.5em;
    height: 2.5em;
    min-width: 2.5em;
    min-height: 2.5em;
  }
}
